SpotBugs

SpotBugs is a static analysis tool that finds bugs in Java bytecode. It detects common programming errors like null pointer dereferences, resource leaks, and concurrency issues.

Specs Using SpotBugs

Spec Description Priority
BUG-001 No Null Returns from Optional Methods critical
BUG-002 Resource Leaks: Try-With-Resources critical
BUG-003 Thread Safety: No Shared Mutable State critical
CS-002 No Star Imports major
MIG-002 Replace java.util.Date with java.time major

Quick Start

Maven

<plugin>
    <groupId>com.github.spotbugs</groupId>
    <artifactId>spotbugs-maven-plugin</artifactId>
    <version>4.8.6.0</version>
</plugin>

Config Location

config/spotbugs/spotbugs-exclude.xml

Trigger Policy

Runs on every push. Critical findings fail the build.

Guides

Guides for this tool will be added as the project evolves.