statick_tool.plugins.reporting package

Module contents

Default reporting plugins for Statick.

Submodules

statick_tool.plugins.reporting.code_climate_reporting_plugin module

Prints the Statick reports out to the terminal or file in Code Climate JSON.

class statick_tool.plugins.reporting.code_climate_reporting_plugin.CodeClimateReportingPlugin[source]

Bases: statick_tool.reporting_plugin.ReportingPlugin

Prints the Statick reports out to the terminal or file in Code Climate JSON.

classmethod get_issue_dict(issue: statick_tool.issue.Issue, category_mapping: Dict[str, str], gitlab: bool) → Dict[str, Any][source]

Convert Issue object into dictionary.

get_name() → str[source]

Return the plugin name.

report(package: statick_tool.package.Package, issues: Dict[str, List[statick_tool.issue.Issue]], level: str) → Tuple[None, bool][source]

Go through the issues list and print them in JSON format.

Parameters:
  • package (Package) – The Package object that was analyzed.
  • issues (dict of str to Issue) – The issues found by the Statick analysis, keyed by the tool that found them.
  • level – (str): Name of the level used in the scan.
write_output(package: statick_tool.package.Package, level: str, line: str) → bool[source]

Write JSON output to a file.

statick_tool.plugins.reporting.do_nothing_reporting_plugin module

Do nothing to have a default reporting plugin with no side effects.

class statick_tool.plugins.reporting.do_nothing_reporting_plugin.DoNothingReportingPlugin[source]

Bases: statick_tool.reporting_plugin.ReportingPlugin

Do nothing.

get_name() → str[source]

Return the name of the plugin.

report(package: statick_tool.package.Package, issues: Dict[str, List[statick_tool.issue.Issue]], level: str) → Tuple[None, bool][source]

Do nothing.

statick_tool.plugins.reporting.json_reporting_plugin module

Prints the Statick reports out to the terminal or file in JSON format.

class statick_tool.plugins.reporting.json_reporting_plugin.JsonReportingPlugin[source]

Bases: statick_tool.reporting_plugin.ReportingPlugin

Prints the Statick reports out to the terminal or file in JSON format.

get_name() → str[source]

Return the plugin name.

report(package: statick_tool.package.Package, issues: Dict[str, List[statick_tool.issue.Issue]], level: str) → Tuple[None, bool][source]

Go through the issues list and print them in JSON format.

Parameters:
  • package (Package) – The Package object that was analyzed.
  • issues (dict of str to Issue) – The issues found by the Statick analysis, keyed by the tool that found them.
  • level – (str): Name of the level used in the scan.
write_output(package: statick_tool.package.Package, level: str, line: str) → bool[source]

Write JSON output to a file.

statick_tool.plugins.reporting.print_to_console_reporting_plugin module

Write issue reports to the console.

class statick_tool.plugins.reporting.print_to_console_reporting_plugin.PrintToConsoleReportingPlugin[source]

Bases: statick_tool.reporting_plugin.ReportingPlugin

Prints the Statick reports out to the terminal.

get_name() → str[source]

Return the name of the plugin.

report(package: statick_tool.package.Package, issues: Dict[str, List[statick_tool.issue.Issue]], level: str) → Tuple[None, bool][source]

Go through the issues list and print them to the console.

Parameters:
  • package (Package) – The Package object that was analyzed.
  • issues (dict of str to Issue) – The issues found by the Statick analysis, keyed by the tool that found them.
  • level – (str): Name of the level used in the scan

statick_tool.plugins.reporting.write_jenkins_warnings_ng_reporting_plugin module

Write Statick results to Jenkins Warnings-NG plugin json-log compatible output.

class statick_tool.plugins.reporting.write_jenkins_warnings_ng_reporting_plugin.WriteJenkinsWarningsNGReportingPlugin[source]

Bases: statick_tool.reporting_plugin.ReportingPlugin

Writes Statick results to Jenkins Warnings-NG json-log compatible output.

get_name() → str[source]

Return the plugin name.

report(package: statick_tool.package.Package, issues: Dict[str, List[statick_tool.issue.Issue]], level: str) → Tuple[None, bool][source]

Write the results to Jenkins Warnings-NG plugin compatible file.

Parameters:
  • package (Package) – The Package object that was analyzed.
  • issues (dict of str to Issue) – The issues found by the Statick analysis, keyed by the tool that found them.
  • level – (str): Name of the level used in the scan.