From fb6d8cafeae68a227f1dfdb5777ebe6c2efbbbdd Mon Sep 17 00:00:00 2001 From: Alexander Xydes Date: Tue, 31 May 2022 14:12:28 -0700 Subject: [PATCH] Adding reporting plugins section to readme. (#417) Fixing docstring in code_climage_reporting_plugin. --- README.md | 17 ++++++++++++++++- .../reporting/code_climate_reporting_plugin.py | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 93470812..6aad1d5e 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Statick is a plugin-based tool with an explicit goal to support external, option * [Existing Plugins](#existing-plugins) * [Discovery Plugins](#discovery-plugins) * [Tool Plugins](#tool-plugins) + * [Reporting Plugins](#reporting-plugins) * [External Plugins](#external-plugins) * [Customization](#customization) * [User Paths](#user-paths) @@ -396,6 +397,16 @@ Tool | About [xmllint][xmllint] | Lint XML files. [yamllint][yamllint] | A linter for YAML files. +### Reporting Plugins + +Reporter | About +:--- | :---- +[code_climate][code-climate] | Output issues in valid Code Climate JSON (or optionally strictly [Gitlab][gitlab-cc] compatible) to stdout or as a file. +do_nothing | Does nothing. +[json] | Output issues as a JSON list either to stdout or as a file. +print_to_console | Print the issues to stdout. +[write_jenkins_warnings_ng][jenkins-warnings-ng] | Write Statick results to Jenkins Warnings-NG plugin json-log compatible output. + ### External Plugins Known external Statick plugins. @@ -750,15 +761,19 @@ His commits were scrubbed from git history upon the initial public release. [clang-format]: https://clang.llvm.org/docs/ClangFormat.html [clang-tidy]: http://clang.llvm.org/extra/clang-tidy/ [cmakelint]: https://cmake-format.readthedocs.io/en/latest/cmake-lint.html +[code-climate]: https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types [cppcheck]: https://github.com/danmar/cppcheck/ [cpplint]: https://github.com/cpplint/cpplint [docformatter]: https://github.com/myint/docformatter [flawfinder]: https://dwheeler.com/flawfinder/ -[npm-groovy-lint]: https://nvuillam.github.io/npm-groovy-lint/ +[gitlab-cc]: https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#implementing-a-custom-tool +[jenkins-warnings-ng]: https://plugins.jenkins.io/warnings-ng/ +[json]: https://www.json.org/json-en.html [lizard]: https://github.com/terryyin/lizard [logging]: https://docs.python.org/3/howto/logging.html [make]: https://gcc.gnu.org/onlinedocs/libstdc++/index.html [mypy]: https://github.com/python/mypy +[npm-groovy-lint]: https://nvuillam.github.io/npm-groovy-lint/ [perlcritic]: http://perlcritic.com/ [pip-git-install]: https://pip.pypa.io/en/stable/reference/pip_install/#git [pip-install-git-repo-branch]: https://stackoverflow.com/questions/20101834/pip-install-from-git-repo-branch diff --git a/statick_tool/plugins/reporting/code_climate_reporting_plugin.py b/statick_tool/plugins/reporting/code_climate_reporting_plugin.py index 3884a4a2..674ac2d6 100644 --- a/statick_tool/plugins/reporting/code_climate_reporting_plugin.py +++ b/statick_tool/plugins/reporting/code_climate_reporting_plugin.py @@ -1,4 +1,4 @@ -"""Prints the Statick reports out to the terminal or file in JSON format.""" +"""Prints the Statick reports out to the terminal or file in Code Climate JSON.""" import hashlib import json import logging @@ -12,7 +12,7 @@ class CodeClimateReportingPlugin(ReportingPlugin): - """Prints the Statick reports out to the terminal or file in JSON format.""" + """Prints the Statick reports out to the terminal or file in Code Climate JSON.""" def get_name(self) -> str: """Return the plugin name."""