This is a Java library for parsing report files from static code analysis.
Example of supported reports are available here.
A number of parsers have been implemented. Some parsers can parse output from several reporters.
Reporter | Parser | Notes |
---|---|---|
ARM-GCC | CLANG |
|
AndroidLint | ANDROIDLINT |
|
AnsibleLint | FLAKE8 |
With -p |
CLang | CLANG |
|
CPD | CPD |
|
CPPCheck | CPPCHECK |
|
CPPLint | CPPLINT |
|
CSSLint | CSSLINT |
|
Checkstyle | CHECKSTYLE |
|
CodeNarc | CODENARC |
|
Detekt | CHECKSTYLE |
With --output-format xml . |
ERB | CLANG |
With erb -P -x -T '-' "${it}" | ruby -c 2>&1 >/dev/null | grep '^-' | sed -E 's/^-([a-zA-Z0-9:]+)/${filename}\1 ERROR:/p' > erbfiles.out . |
DocFX | DOCFX |
|
Doxygen | CLANG |
|
ESLint | CHECKSTYLE |
With format: 'checkstyle' . |
Findbugs | FINDBUGS |
|
Flake8 | FLAKE8 |
|
FxCop | FXCOP |
|
GCC | CLANG |
|
Gendarme | GENDARME |
|
GoLint | GOLINT |
|
GoVet | GOLINT |
Same format as GoLint. |
GoogleErrorProne | GOOGLEERRORPRONE |
|
Infer | PMD |
Facebook Infer. With --pmd-xml . |
IAR | IAR |
With --no_wrap_diagnostics |
JCReport | JCREPORT |
|
JSHint | JSHINT |
|
KTLint | CHECKSTYLE |
|
Klocwork | KLOCWORK |
|
KotlinGradle | KOTLINGRADLE |
Output from Kotlin Gradle Plugin. |
KotlinMaven | KOTLINMAVEN |
Output from Kotlin Maven Plugin. |
Lint | LINT |
A common XML format, used by different linters. |
Mccabe | FLAKE8 |
|
MyPy | MYPY |
|
MSCpp | MSCPP |
|
NullAway | GOOGLEERRORPRONE |
Same format as Google Error Prone. |
PCLint | PCLINT |
PC-Lint using the same output format as the Jenkins warnings plugin, details here |
PHPCS | CHECKSTYLE |
With phpcs api.php --report=checkstyle . |
PHPPMD | PMD |
With phpmd api.php xml ruleset.xml . |
PMD | PMD |
|
Pep8 | FLAKE8 |
|
PerlCritic | PERLCRITIC |
|
PiTest | PITEST |
|
Puppet-Lint | CLANG |
With -log-format %{fullpath}:%{line}:%{column}: %{kind}: %{message} |
PyDocStyle | PYDOCSTYLE |
|
PyFlakes | FLAKE8 |
|
PyLint | PYLINT |
With pylint --output-format=parseable . |
ReSharper | RESHARPER |
|
RubyCop | CLANG |
With rubycop -f clang file.rb |
SbtScalac | SBTSCALAC |
|
Simian | SIMIAN |
|
Spotbugs | FINDBUGS |
|
StyleCop | STYLECOP |
|
SwiftLint | CHECKSTYLE |
With --reporter checkstyle . |
TSLint | CHECKSTYLE |
With -t checkstyle |
XMLLint | XMLLINT |
|
YAMLLint | YAMLLINT |
With -f parsable |
ZPTLint | ZPTLINT |
Missing a format? Open an issue here!
Very easy to use with a nice builder pattern
List<Violation> violations = violationsReporterApi() //
.withPattern(".*/findbugs/.*\\.xml$") //
.inFolder(rootFolder) //
.findAll(FINDBUGS) //
.violations();
The library is used in a bunch of other projects, these are some of them.
Gradle:
- Violation Comments to GitHub Gradle Plugin.
- Violation Comments to GitLab Gradle Plugin.
- Violations Gradle Plugin.
Maven:
- Violation Comments to GitHub Maven Plugin.
- Violation Comments to GitLab Maven Plugin.
- Violations Maven Plugin.
Jenkins:
- Violation Comments to GitHub Jenkins Plugin.
- Violation Comments to GitLab Jenkins Plugin.
- Violation Comments to Bitbucket Server Jenkins Plugin.
And these supporting libraries: