-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckerFramework vs Intellij Idea built-in checkers? #3126
Comments
This is discussed in the Checker Framework manual: https://checkerframework.org/manual/#faq-type-checking-vs-bug-detectors IntelliJ's only handles one type system: nullness. The Checker Framework handles many type systems and thus can find more different types of bugs in your program. |
@mernst Thanks very much! |
In favor of IntelliJ, it's only fair to note that it runs faster and has nicer IDE integration. |
Get it. So I may try to do the following: (1) Do not disable Intellij (2) Install Checker's Intellij plugin (https://blog.rcook.org/blog/2019/01-intellij-checker-framework/) (3) Use Checker inside a continuous integration pipeline (e.g. Jenkins). :) |
That is a reasonable approach. If IntelliJ issues false positive warnings, you may need to suppress them (same for the Checker Framework). |
@mernst Sorry I find a cornerstone in the way of using the library: I am using Spring together with lots of libraries. Thus, I have to annotate a LOT of libraries :/ P.S. I am confused about the description of @top and @bottom. Which mean NotNull and which means Nullable, in the context of null checker, or neither? Thanks! |
|
Thanks! I find 26.5.6 says
So does it mean
Or
Thanks! |
Regular Java types are never read or changed by the Checker Framework. It only works with type qualifiers/annotations. |
Thanks! |
I tried to install it using the Thus, I am thinking about an alternative: (1) When developing (with Intellij), run without Checker Framework or Delombok. What do you think about this strategy? By the way, what is your workflow or pipeline in your daily life when using Checker Framework? Anyway, thanks so much for this wonderful library that I believe can save a lot of time and energy! |
I agree that Lombok integration is a problem. The Gradle plugin removes some of the pain, but it sounds like you are using Maven. Slow compilation is the worst thing about the Checker Framework. Personally, I run the Checker Framework on every compile for small projects (ones that have less than about 10KLOC). For larger projects, I do what you suggest: I run the Checker Framework periodically, such as in a git pre-commit hook or in continuous integration (such as Jenkins). I added some text about this to the manual, in commit 64a90ca. |
Thanks very much! I will try to do that in a continuous integration environment. By the way, there are some libraries which generate code when running (instead of compiling). For instance, MyBatis. The full code looks like: public interface BlogMapper {
@Select("SELECT * FROM blog WHERE id = #{id}")
Blog selectBlog(int id);
} and nothing more - no implementation classes or anything more! MyBatis will generate code when starting the application. And note that the result My idea is that, I have to manually be aware of the problem, and manually change to In addition, such dynamically generated classes are very common in the Spring framework... So I do not know whether there will be much more such things hidden in the dark, generating NPEs... Thanks! |
This issue #3126 about the Checker Framework versus IntelliJ is really not the right place for many unrelated questions about the Checker Framework. Could you please open new issues or use the mailing list? I can't answer your question because I don't know MyBatis details. |
@mernst Sorry for wrongly using this issue! I will open new issues or using mailing list (https://groups.google.com/forum/#!forum/checker-framework-discuss ). The |
Thanks for the wonderful library! I wonder what are the differences (pros) between this framework and Intellij's default one?
The text was updated successfully, but these errors were encountered: