Checkstyle is an linter/formatter/static analysis tool for Java used in the project. However, it is pretty old, can only be configured with XML, can only generate reports in HTML by default and only supports two code styles (Sun and Google Java).
A more modern alternative would be to use Sonar for linting and static analysis and Spotless for formatting.