<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.2.3</version>
</dependency>
import edu.umd.cs.findbugs.annotations.*;
public class MyClass {
@CheckReturnValue
public static int calculate(int x, int y) {
return x + y;
}
@SuppressFBWarnings("VA_FORMAT_STRING_USES_NEWLINE")
public static void main(String[] args) {
String message = null;
}
}
spotbugs -textui <path-to-your-project>