From 93a2736d0116198f52592fec20eb39c692ea7bfe Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Sat, 22 Sep 2018 17:38:11 +0200 Subject: [PATCH] Doc --- README.md | 112 +++++++++--------- .../violations/lib/reports/ReporterTest.java | 4 + 2 files changed, 60 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 62f69921..61006c66 100644 --- a/README.md +++ b/README.md @@ -6,62 +6,62 @@ Example of supported reports are available [here](https://github.com/tomasbjerre A number of **parsers** have been implemented. Some **parsers** can parse output from several **reporters**. -| Parser | Reporter | Notes -| --- | --- | --- -| `ANDROIDLINT` | [_AndroidLint_](http://developer.android.com/tools/help/lint.html) | -| `CHECKSTYLE` | [_Checkstyle_](http://checkstyle.sourceforge.net/) | -| | [_Detekt_](https://github.com/arturbosch/detekt) | with `--output-format xml`. -| | [_ESLint_](https://github.com/sindresorhus/grunt-eslint) | with `format: 'checkstyle'`. -| | [_KTLint_](https://github.com/shyiko/ktlint) | -| | [_SwiftLint_](https://github.com/realm/SwiftLint) | with `--reporter checkstyle`. -| | [_TSLint_](https://palantir.github.io/tslint/usage/cli/) | with `-t checkstyle` -| | [_PHPCS_](https://github.com/squizlabs/PHP_CodeSniffer) | with `phpcs api.php --report=checkstyle`. -| `CLANG` | [_CLang_](https://clang-analyzer.llvm.org/) | -| | [_RubyCop_](http://rubocop.readthedocs.io/en/latest/formatters/) | with `rubycop -f clang file.rb` -| | [_GCC_](https://gcc.gnu.org/) -| | [_ARM-GCC_](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm) -| | [_Doxygen_](https://www.stack.nl/~dimitri/doxygen/) -| `CODENARC` | [_CodeNarc_](http://codenarc.sourceforge.net/) -| `CPD` | [_CPD_](http://pmd.sourceforge.net/pmd-4.3.0/cpd.html) -| `CPPLINT` | [_CPPLint_](https://github.com/theandrewdavis/cpplint) -| `CPPCHECK` | [_CPPCheck_](http://cppcheck.sourceforge.net/) -| `CSSLINT` | [_CSSLint_](https://github.com/CSSLint/csslint) -| `DOCFX` | [_DocFX_](http://dotnet.github.io/docfx/) -| `FINDBUGS` | [_Findbugs_](http://findbugs.sourceforge.net/) -| | [_Spotbugs_](https://spotbugs.github.io/) -| `FLAKE8` | [_Flake8_](http://flake8.readthedocs.org/en/latest/) -| | [_AnsibleLint_](https://github.com/willthames/ansible-lint) | with `-p` -| | [_Mccabe_](https://pypi.python.org/pypi/mccabe) -| | [_Pep8_](https://github.com/PyCQA/pycodestyle) -| | [_PyFlakes_](https://pypi.python.org/pypi/pyflakes) -| `FXCOP` | [_FxCop_](https://en.wikipedia.org/wiki/FxCop) -| `GENDARME` | [_Gendarme_](http://www.mono-project.com/docs/tools+libraries/tools/gendarme/) -| `GOLINT` | [_GoLint_](https://github.com/golang/lint) -| | [_GoVet_](https://golang.org/cmd/vet/) | Same format as GoLint. -| `GOOGLEERRORPRONE` | [_GoogleErrorProne_](https://github.com/google/error-prone) -| | [_NullAway_](https://github.com/uber/NullAway) | Same format as Google Error Prone. -| `JSHINT` | [_JSHint_](http://jshint.com/) -| `LINT` | _Lint_ | A common XML format, used by different linters. -| `JCREPORT` | [_JCReport_](https://github.com/jCoderZ/fawkez/wiki/JcReport) -| `KLOCWORK` | [_Klocwork_](http://www.klocwork.com/products-services/klocwork/static-code-analysis) -| `KOTLINMAVEN` | [_KotlinMaven_](https://github.com/JetBrains/kotlin) | Output from Kotlin Maven Plugin. -| `KOTLINGRADLE` | [_KotlinGradle_](https://github.com/JetBrains/kotlin) | Output from Kotlin Gradle Plugin. -| `MYPY` | [_MyPy_](https://pypi.python.org/pypi/mypy-lang) -| `PCLINT` | [_PCLint_](http://www.gimpel.com/html/pcl.htm) | PC-Lint using the same output format as the Jenkins warnings plugin, [_details here_](https://wiki.jenkins.io/display/JENKINS/PcLint+options) -| `PERLCRITIC` | [_PerlCritic_](https://github.com/Perl-Critic) -| `PITEST` | [_PiTest_](http://pitest.org/) -| `PYDOCSTYLE` | [_PyDocStyle_](https://pypi.python.org/pypi/pydocstyle) -| `PYLINT` | [_PyLint_](https://www.pylint.org/) | with `pylint --output-format=parseable`. -| `PMD` | [_PMD_](https://pmd.github.io/) -| | [_Infer_](http://fbinfer.com/) | Facebook Infer. With `--pmd-xml`. -| | [_PHPPMD_](https://phpmd.org/) | with `phpmd api.php xml ruleset.xml`. -| `RESHARPER` | [_ReSharper_](https://www.jetbrains.com/resharper/) -| `SBTSCALAC` | [_SbtScalac_](http://www.scala-sbt.org/) -| `SIMIAN` | [_Simian_](http://www.harukizaemon.com/simian/) -| `STYLECOP` | [_StyleCop_](https://stylecop.codeplex.com/) -| `XMLLINT` | [_XMLLint_](http://xmlsoft.org/xmllint.html) -| `YAMLLINT` | [_YAMLLint_](https://yamllint.readthedocs.io/en/stable/index.html) | with `-f parsable` -| `ZPTLINT` | [_ZPTLint_](https://pypi.python.org/pypi/zptlint) +| Reporter | Parser | Notes +| --- | --- | --- +| [_ARM-GCC_](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm) | `CLANG` +| [_AndroidLint_](http://developer.android.com/tools/help/lint.html) | `ANDROIDLINT` +| [_AnsibleLint_](https://github.com/willthames/ansible-lint) | `FLAKE8` | With `-p` +| [_CLang_](https://clang-analyzer.llvm.org/) | `CLANG` +| [_CPD_](http://pmd.sourceforge.net/pmd-4.3.0/cpd.html) | `CPD` +| [_CPPCheck_](http://cppcheck.sourceforge.net/) | `CPPCHECK` +| [_CPPLint_](https://github.com/theandrewdavis/cpplint) | `CPPLINT` +| [_CSSLint_](https://github.com/CSSLint/csslint) | `CSSLINT` +| [_Checkstyle_](http://checkstyle.sourceforge.net/) | `CHECKSTYLE` +| [_CodeNarc_](http://codenarc.sourceforge.net/) | `CODENARC` +| [_Detekt_](https://github.com/arturbosch/detekt) | `CHECKSTYLE` | With `--output-format xml`. +| [_DocFX_](http://dotnet.github.io/docfx/) | `DOCFX` +| [_Doxygen_](https://www.stack.nl/~dimitri/doxygen/) | `CLANG` +| [_ESLint_](https://github.com/sindresorhus/grunt-eslint) | `CHECKSTYLE` | With `format: 'checkstyle'`. +| [_Findbugs_](http://findbugs.sourceforge.net/) | `FINDBUGS` +| [_Flake8_](http://flake8.readthedocs.org/en/latest/) | `FLAKE8` +| [_FxCop_](https://en.wikipedia.org/wiki/FxCop) | `FXCOP` +| [_GCC_](https://gcc.gnu.org/) | `CLANG` +| [_Gendarme_](http://www.mono-project.com/docs/tools+libraries/tools/gendarme/) | `GENDARME` +| [_GoLint_](https://github.com/golang/lint) | `GOLINT` +| [_GoVet_](https://golang.org/cmd/vet/) | `GOLINT` | Same format as GoLint. +| [_GoogleErrorProne_](https://github.com/google/error-prone) | `GOOGLEERRORPRONE` +| [_Infer_](http://fbinfer.com/) | `PMD` | Facebook Infer. With `--pmd-xml`. +| [_JCReport_](https://github.com/jCoderZ/fawkez/wiki/JcReport) | `JCREPORT` +| [_JSHint_](http://jshint.com/) | `JSHINT` +| [_KTLint_](https://github.com/shyiko/ktlint) | `CHECKSTYLE` +| [_Klocwork_](http://www.klocwork.com/products-services/klocwork/static-code-analysis) | `KLOCWORK` +| [_KotlinGradle_](https://github.com/JetBrains/kotlin) | `KOTLINGRADLE` | Output from Kotlin Gradle Plugin. +| [_KotlinMaven_](https://github.com/JetBrains/kotlin) | `KOTLINMAVEN` | Output from Kotlin Maven Plugin. +| _Lint_ | `LINT` | A common XML format, used by different linters. +| [_Mccabe_](https://pypi.python.org/pypi/mccabe) | `FLAKE8` +| [_MyPy_](https://pypi.python.org/pypi/mypy-lang) | `MYPY` +| [_NullAway_](https://github.com/uber/NullAway) | `GOOGLEERRORPRONE` | Same format as Google Error Prone. +| [_PCLint_](http://www.gimpel.com/html/pcl.htm) | `PCLINT` | PC-Lint using the same output format as the Jenkins warnings plugin, [_details here_](https://wiki.jenkins.io/display/JENKINS/PcLint+options) +| [_PHPCS_](https://github.com/squizlabs/PHP_CodeSniffer) | `CHECKSTYLE` | with `phpcs api.php --report=checkstyle`. +| [_PHPPMD_](https://phpmd.org/) | `PMD` | with `phpmd api.php xml ruleset.xml`. +| [_PMD_](https://pmd.github.io/) | `PMD` +| [_Pep8_](https://github.com/PyCQA/pycodestyle) | `FLAKE8` +| [_PerlCritic_](https://github.com/Perl-Critic) | `PERLCRITIC` +| [_PiTest_](http://pitest.org/) | `PITEST` +| [_PyDocStyle_](https://pypi.python.org/pypi/pydocstyle) | `PYDOCSTYLE` +| [_PyFlakes_](https://pypi.python.org/pypi/pyflakes) | `FLAKE8` +| [_PyLint_](https://www.pylint.org/) | `PYLINT` | With `pylint --output-format=parseable`. +| [_ReSharper_](https://www.jetbrains.com/resharper/) | `RESHARPER` +| [_RubyCop_](http://rubocop.readthedocs.io/en/latest/formatters/) | `CLANG` | With `rubycop -f clang file.rb` +| [_SbtScalac_](http://www.scala-sbt.org/) | `SBTSCALAC` +| [_Simian_](http://www.harukizaemon.com/simian/) | `SIMIAN` +| [_Spotbugs_](https://spotbugs.github.io/) | `FINDBUGS` +| [_StyleCop_](https://stylecop.codeplex.com/) | `STYLECOP` +| [_SwiftLint_](https://github.com/realm/SwiftLint) | `CHECKSTYLE` | With `--reporter checkstyle`. +| [_TSLint_](https://palantir.github.io/tslint/usage/cli/) | `CHECKSTYLE` | With `-t checkstyle` +| [_XMLLint_](http://xmlsoft.org/xmllint.html) | `XMLLINT` +| [_YAMLLint_](https://yamllint.readthedocs.io/en/stable/index.html) | `YAMLLINT` | With `-f parsable` +| [_ZPTLint_](https://pypi.python.org/pypi/zptlint) | `ZPTLINT` Missing a format? Open an issue [here](https://github.com/tomasbjerre/violations-lib/issues)! diff --git a/src/test/java/se/bjurr/violations/lib/reports/ReporterTest.java b/src/test/java/se/bjurr/violations/lib/reports/ReporterTest.java index 9985d1ec..8a4fc353 100644 --- a/src/test/java/se/bjurr/violations/lib/reports/ReporterTest.java +++ b/src/test/java/se/bjurr/violations/lib/reports/ReporterTest.java @@ -4,7 +4,11 @@ import java.io.File; import java.nio.charset.Charset; +import java.util.Collections; +import java.util.List; + import org.assertj.core.util.Files; +import org.assertj.core.util.Lists; import org.junit.Test; public class ReporterTest {