Checkstyle vs. PMD

You should definitely use FindBugs. In my experience, the false-positive rate is very low, and even the least-critical warnings it reports are worth addressing to some extent. As for Checkstyle vs. PMD, I would not use Checkstyle since it is pretty much only concerned with style. In my experience, Checkstyle will report on a ton … Read more

Why is package-info.java useful?

It is used to generate javadocs for a package. /** * Domain classes used to produce ….. * <p> * These classes contain the …… * </p> * * @since 1.0 * @author somebody * @version 1.0 */ package com.domain; Will generate package info for com.domain package: Example result: https://docs.oracle.com/javase/7/docs/api/java/awt/package-summary.html

Disable a particular Checkstyle rule for a particular line of code?

Check out the use of the supressionCommentFilter at http://checkstyle.sourceforge.net/config_filters.html#SuppressionCommentFilter. You’ll need to add the module to your checkstyle.xml <module name=”SuppressionCommentFilter”/> and it’s configurable. Thus you can add comments to your code to turn off checkstyle (at various levels) and then back on again through the use of comments in your code. E.g. //CHECKSTYLE:OFF public void … Read more