This is a library for parsing report files from static code analysis.
It supports:
- Checkstyle
- CPPLint
- CPPCheck
- CSSLint
- Findbugs
- Flake8 (PyLint, Pep8, Mccabe, PyFlakes)
- JSHint
- Lint A common XML format, used by different linters.
- PerlCritic
- PiTest
- PMD
- ReSharper
- XMLLint
Example reports are available in the test resources, examples of how to generate them are available here.
Very easy to use with a nice builder pattern
List<Violation> violations = violationsReporterApi() //
.withPattern(".*/findbugs/.*\\.xml$") //
.inFolder(rootFolder) //
.findAll(FINDBUGS) //
.violations();
Or
List<Violation> violations = violationsAccumulatedReporterApi() //
.withViolations( //
violationsReporterApi() //
.withPattern(".*/findbugs/.*\\.xml$") //
.inFolder(rootFolder) //
.findAll(FINDBUGS) //
.violations() //
) //
.withViolations( //
violationsReporterApi() //
.withPattern(".*/pmd/.*\\.xml$") //
.inFolder(rootFolder) //
.findAll(PMD) //
.violations() //
) //
.withAtLeastSeverity(ERROR)//
.orderedBy(FILE)//
.violations();
It is used by:
- Violation Comments to GitHub Gradle Plugin.
- Violation Comments to GitHub Maven Plugin.
- Violation Comments to GitHub Jenkins Plugin.
- Violation Comments to GitHub Lib.
- Violation Comments Lib.
To build the code, have a look at .travis.yml
.
To do a release you need to do ./gradlew release
and release the artifact from staging. More information here.