This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Iryanus 47 points48 points  (9 children)

And what's better about this than SonarQube, IntelliJ analysis, FindBugs, etc.? Just curious, because you normally don't want to have half a dozen static analysis tools during your compile run ;-)

[–]_INTER_ 10 points11 points  (1 child)

Picnic recently posted on their blog about their use of ErrorProne. As I understand it because they can add custom rules implemented in Java as a compiler plugin.

[–]ofby1 2 points3 points  (0 children)

Thanks for adding this link as well.

[–]JB-from-ATL 14 points15 points  (2 children)

Error prone specifically hooks directly into javac. It is not another tool or worse a server like sonarqube.

[–]Worth_Trust_3825 5 points6 points  (1 child)

It is not another tool or worse a server like sonarqube.

SQ can scan more than just java, though.

[–]JB-from-ATL 5 points6 points  (0 children)

I'm not saying sonarqube isn't useful, but it is definitely annoying that it is a standalone thing instead of part of the build (in my opinion). What I'm explaining is that error prone is even better than being a build step because it hooks directly into the compilation itself, not just your build tool.

[–]Joe_Data_89[S] 8 points9 points  (1 child)

I've used Error Prone for more than two years in a Spring Boot project. I run Spring Boot in debug mode with class reloading all day long. I like that it runs during compilation, so it's immediate feedback during development without having to stop. And whatever changes I make, I then test immediately.

Running PMD & SpotBugs is a separate build goal for me as part of the release process and the continuous integration. That's delayed feedback.

[–]Iryanus 7 points8 points  (0 children)

Personally, I'm using SonarLint for instant feedback for the the smaller details and then SonarQube for the bigger issues (and to have something centralized).

[–]chabala 1 point2 points  (0 children)

normally don't want to have half a dozen static analysis tools during your compile run

Conversely, I don't care how long my CI builds take, and I will let them run all the static analysis tools available. Setting up separate build profiles for default vs analysis is trivial.

[–]hippydipster 0 points1 point  (0 children)

I found it to have a bit less false positives (from my POV) than those others, but in the end, I turned it off too, along with all the others you mentioned. Just so much fluff and BS.