Ask HN: Tooling for Improving Java Codebase

4 points by leksak ↗ HN
What are some of your favourite projects that you rely on to improve the quality of your codebases? I'm thinking along the lines of Lombok and equalsverifier. And, ostensibly, linters such as checking that utility classes don't contain any non-static methods etcetera. I'm not thinking Sonar, but if anyone wants to share any resources on how to make Sonar a better tool (signal/noise) please share.

3 comments

[ 2.7 ms ] story [ 15.1 ms ] thread
Checkstyle is a must for any project with more than 1 developer (or even with 1).

Findbugs/spotbugs maven/gradle plugins are nice, but require a little bit of tuning to eliminate false positives. Nothing near the amount of tuning or upkeep a Sonar instance requires though.

Use @Nullable, @Nonnull, @ParametersAreNonNullByDefault annotations. I prefer "non-null by default" via a package-level annotation from @ParametersAreNonNullByDefault and using @Nullable where appropriate.

Use the Error Prone compiler/build plugin.