statick_tool.plugins.tool package¶
Module contents¶
Default tool plugins for statick.
Submodules¶
statick_tool.plugins.tool.bandit module¶
Apply bandit tool and gather results.
- class statick_tool.plugins.tool.bandit.BanditToolPlugin[source]¶
Bases:
ToolPluginApply bandit tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level to run the tool at.
package – The package being processed.
- Returns:
The binary name.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.black module¶
Apply black tool and gather results.
- class statick_tool.plugins.tool.black.BlackToolPlugin[source]¶
Bases:
ToolPluginApply black tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.catkin_lint module¶
Apply catkin_lint tool and gather results.
- class statick_tool.plugins.tool.catkin_lint.CatkinLintToolPlugin[source]¶
Bases:
ToolPluginApply catkin_lint tool and gather results.
- classmethod check_for_exceptions_has_file(match: Match[str], package: Package) bool[source]¶
Manual exceptions.
- Parameters:
match – The regex match object.
package – The package to scan.
- Returns:
True if the match is an exception, False otherwise.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- classmethod get_severity(issue_type: str) int[source]¶
Get level for given issue type.
- Parameters:
issue_type – The type of the issue.
- Returns:
The severity level.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues found by the tool.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to use.
- Returns:
The output from the tool.
statick_tool.plugins.tool.cccc module¶
Apply CCCC tool and gather results.
To run the CCCC tool locally (without Statick) one way to do so is:
find . -name *.h -print -o -name *.cpp -print | xargs cccc
That will generate several reports, including HTML. The results can be viewd in a web browser.
- class statick_tool.plugins.tool.cccc.CCCCToolPlugin[source]¶
Bases:
ToolPluginApply CCCC tool and gather results.
- classmethod convert_name_to_id(name: str) str[source]¶
Convert result name to configuration name.
The name given in CCCC results is different than the name given in CCCC configuration. This will map the name in the configuration file to the name given in the results.
- Parameters:
name – The name to convert.
- Returns:
The converted name.
- find_issues(config: dict[Any, Any], results: dict[Any, Any], src: str) list[Issue][source]¶
Identify issues by comparing tool results with tool configuration.
- Parameters:
config – The configuration dictionary.
results – The results dictionary.
src – The source file being scanned.
- Returns:
A list of issues found by the tool.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The name of the tool binary.
- get_version() str[source]¶
Figure out and return the version of the tool that’s installed.
If no version is found the function returns “Uninstalled”.
- Returns:
The version of the tool.
- classmethod parse_config(config_file: str) dict[str, str][source]¶
Parse CCCC configuration file.
Gets warning and error thresholds for all the metrics. An explanation to dump default values to a configuration file is at: http://sarnold.github.io/cccc/CCCC_User_Guide.html#config
cccc –opt_outfile=cccc.opt
- Parameters:
config_file – The configuration file.
- Returns:
A dictionary containing the parsed configuration.
statick_tool.plugins.tool.chktex module¶
Apply chktex tool and gather results.
Chktex documentation at http://mirrors.rit.edu/CTAN/systems/doc/chktex/ChkTeX.pdf.
- class statick_tool.plugins.tool.chktex.ChktexToolPlugin[source]¶
Bases:
ToolPluginApply chktex tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues found by the tool.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to use.
- Returns:
The output from the tool.
statick_tool.plugins.tool.clang_format module¶
Apply clang-format tool and gather results.
- class statick_tool.plugins.tool.clang_format.ClangFormatToolPlugin[source]¶
Bases:
ToolPluginApply clang-format tool and gather results.
- check_configuration(clang_format_bin: str) bool | None[source]¶
Check that configuration is configured properly.
- Parameters:
clang_format_bin – The clang-format binary.
- Returns:
True if the configuration is correct, False otherwise.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Return the name of the tool binary.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The name of the tool binary.
statick_tool.plugins.tool.clang_tidy module¶
Apply clang-tidy tool and gather results.
- class statick_tool.plugins.tool.clang_tidy.ClangTidyToolPlugin[source]¶
Bases:
ToolPluginApply clang-tidy tool and gather results.
- classmethod check_for_exceptions(match: Match[str]) bool[source]¶
Manual exceptions.
- Parameters:
match – The regex match object.
- Returns:
True if the match is an exception, False otherwise.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- classmethod get_tool_dependencies() list[str][source]¶
Get a list of tools that must run before this one.
- Returns:
A list of tool dependencies.
statick_tool.plugins.tool.cmakelint module¶
Apply cmakelint tool and gather results.
- class statick_tool.plugins.tool.cmakelint.CMakelintToolPlugin[source]¶
Bases:
ToolPluginApply cmakelint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues found by the tool.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to use.
- Returns:
The output from the tool.
statick_tool.plugins.tool.cppcheck module¶
Apply cppcheck tool and gather results.
- class statick_tool.plugins.tool.cppcheck.CppcheckToolPlugin[source]¶
Bases:
ToolPluginApply cppcheck tool and gather results.
- classmethod check_for_exceptions(match: Match[str]) bool[source]¶
Manual exceptions.
- Parameters:
match – The regex match object.
- Returns:
True if the match is an exception, False otherwise.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The name of the tool binary.
- parse_tool_output(output: str) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
output – The output from the tool.
- Returns:
A list of issues found by the tool.
statick_tool.plugins.tool.cpplint module¶
Apply Cpplint tool and gather results.
- class statick_tool.plugins.tool.cpplint.CpplintToolPlugin[source]¶
Bases:
ToolPluginApply Cpplint tool and gather results.
- classmethod check_for_exceptions(match: Match[str]) bool[source]¶
Manual exceptions.
- Parameters:
match – The regex match object.
- Returns:
True if the match is an exception, False otherwise.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Return the name of the tool binary.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The name of the tool binary.
statick_tool.plugins.tool.docformatter module¶
Apply docformatter tool and gather results.
- class statick_tool.plugins.tool.docformatter.DocformatterToolPlugin[source]¶
Bases:
ToolPluginApply docformatter tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.dockerfile_lint module¶
Apply dockerfile-lint tool and gather results.
- class statick_tool.plugins.tool.dockerfile_lint.DockerfileULintToolPlugin[source]¶
Bases:
ToolPluginApply dockerfile-lint tool and gather results.
- classmethod add_filename(output: str, src: str) str[source]¶
Add the filename to the json output.
This is because dockerfile-lint does not include the filename in the output.
Some warnings and errors are included in the tool output, but they are not in json format. Those lines start with a “(”. Any line that does not start with a “(” is considered to be a line of output.
- Parameters:
output – The output string.
src – The source file.
- Returns:
Updated output string.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The analysis level.
package – The package being analyzed.
- Returns:
Name of the tool binary.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- get_version() str[source]¶
Figure out and return the version of the tool that’s installed.
- Returns:
Version of the tool or “Unknown” if not found.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.dockerfilelint module¶
Apply dockerfilelint tool and gather results.
- class statick_tool.plugins.tool.dockerfilelint.DockerfileLintToolPlugin[source]¶
Bases:
ToolPluginApply dockerfilelint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.do_nothing module¶
Do nothing, this is primarily useful for testing purposes.
- class statick_tool.plugins.tool.do_nothing.DoNothingToolPlugin[source]¶
Bases:
ToolPluginDo nothing, this is primarily useful for testing purposes.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The analysis level.
package – The package being analyzed.
- Returns:
Name of the tool binary.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- get_version() str[source]¶
Figure out and return the version of the tool that’s installed.
- Returns:
Version of the tool.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.eslint module¶
Apply eslint tool and gather results.
- class statick_tool.plugins.tool.eslint.ESLintToolPlugin[source]¶
Bases:
ToolPluginApply eslint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- get_format_file(level: str) Tuple[str | None, bool][source]¶
Retrieve format file path.
- Parameters:
level – The analysis level.
- Returns:
Tuple containing the format file path and a boolean indicating if the file was copied.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.flawfinder module¶
Apply flawfinder tool and gather results.
- class statick_tool.plugins.tool.flawfinder.FlawfinderToolPlugin[source]¶
Bases:
ToolPluginApply flawfinder tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.groovylint module¶
Apply GroovyLint tool and gather results.
- class statick_tool.plugins.tool.groovylint.GroovyLintToolPlugin[source]¶
Bases:
ToolPluginApply GroovyLint tool and gather results.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The analysis level.
package – The package being analyzed.
- Returns:
Name of the tool binary.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- get_version() str[source]¶
Figure out and return the version of the tool that’s installed.
- Returns:
Version of the tool or “Unknown” if not found.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.hadolint module¶
Apply hadolint tool and gather results.
- class statick_tool.plugins.tool.hadolint.HadolintToolPlugin[source]¶
Bases:
ToolPluginApply hadolint tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The analysis level.
package – The package being analyzed.
- Returns:
Name of the tool binary.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- get_version() str[source]¶
Figure out and return the version of the tool that’s installed.
- Returns:
Version of the tool or “Unknown” if not found.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being analyzed.
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
- scan_docker(tool_bin: str, flags: list[str], files: list[str], config_file_path: str) str | None[source]¶
Use hadolint docker image to scan.
- Parameters:
tool_bin – The tool binary.
flags – List of flags.
files – List of files to scan.
config_file_path – Path to the config file.
- Returns:
Output string or None.
statick_tool.plugins.tool.htmllint module¶
Apply htmllint tool and gather results.
- class statick_tool.plugins.tool.htmllint.HTMLLintToolPlugin[source]¶
Bases:
ToolPluginApply HTML tidy tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package being analyzed.
level – The analysis level.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.isort module¶
Apply isort tool and gather results.
The isort tool will only find if a file has issues with imports. To automatically fix the issues you can run isort <file>.
- class statick_tool.plugins.tool.isort.IsortToolPlugin[source]¶
Bases:
ToolPluginApply isort tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.jshint module¶
Apply jshint tool and gather results.
- class statick_tool.plugins.tool.jshint.JSHintToolPlugin[source]¶
Bases:
ToolPluginApply jshint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.lacheck module¶
Apply lacheck tool and gather results.
- class statick_tool.plugins.tool.lacheck.LacheckToolPlugin[source]¶
Bases:
ToolPluginApply lacheck tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.lizard module¶
Apply lizard tool and gather results.
- class statick_tool.plugins.tool.lizard.LizardToolPlugin[source]¶
Bases:
ToolPluginApply Lizard tool and gather results.
Note: The -f/–input_file, -o/–output_file, and -Edumpcomments options are unsupported.
- parse_tool_output(output: str) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
output – The output from the tool.
- Returns:
List of issues found.
- remove_invalid_flags(flag_list: list[str]) list[str][source]¶
Filter out all disabled flags.
- Parameters:
flag_list – List of flags to filter.
- Returns:
List of valid flags.
statick_tool.plugins.tool.make module¶
Apply make tool and gather results.
- class statick_tool.plugins.tool.make.MakeToolPlugin[source]¶
Bases:
ToolPluginApply Make tool and gather results.
- classmethod check_for_exceptions(match: Match[str]) bool[source]¶
Manual exceptions.
- Parameters:
match – The regex match object.
- Returns:
Boolean indicating if the match is an exception.
- classmethod filter_matches(matches: Any, package: Package) Any[source]¶
Filter matches.
- Parameters:
matches – List of matches.
package – The package being processed.
- Returns:
Filtered list of matches.
statick_tool.plugins.tool.markdownlint module¶
Apply markdownlint tool and gather results.
- class statick_tool.plugins.tool.markdownlint.MarkdownlintToolPlugin[source]¶
Bases:
ToolPluginApply markdownlint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.mypy module¶
Apply mypy tool and gather results.
- class statick_tool.plugins.tool.mypy.MypyToolPlugin[source]¶
Bases:
ToolPluginApply mypy tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.perlcritic module¶
Apply Perl::Critic tool and gather results.
- class statick_tool.plugins.tool.perlcritic.PerlCriticToolPlugin[source]¶
Bases:
ToolPluginApply Perl::Critic tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The binary name of the tool.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.pycodestyle module¶
Apply pycodestyle tool and gather results.
- class statick_tool.plugins.tool.pycodestyle.PycodestyleToolPlugin[source]¶
Bases:
ToolPluginApply pycodestyle tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.pydocstyle module¶
Apply pydocstyle tool and gather results.
- class statick_tool.plugins.tool.pydocstyle.PydocstyleToolPlugin[source]¶
Bases:
ToolPluginApply pydocstyle tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.pyflakes module¶
Apply pyflakes tool and gather results.
- class statick_tool.plugins.tool.pyflakes.PyflakesToolPlugin[source]¶
Bases:
ToolPluginApply pyflakes tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.pylint module¶
Apply pylint tool and gather results.
- class statick_tool.plugins.tool.pylint.PylintToolPlugin[source]¶
Bases:
ToolPluginApply pylint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.pyright module¶
Apply pyright tool and gather results.
- class statick_tool.plugins.tool.pyright.PyrightToolPlugin[source]¶
Bases:
ToolPluginApply pyright tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package being processed.
- Returns:
List of issues found.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to run the tool at.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.rstcheck module¶
Apply rstcheck tool and gather results.
- class statick_tool.plugins.tool.rstcheck.RstcheckToolPlugin[source]¶
Bases:
ToolPluginApply rstcheck tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.rstlint module¶
Apply rst-lint tool and gather results.
- class statick_tool.plugins.tool.rstlint.RstlintToolPlugin[source]¶
Bases:
ToolPluginApply rst-lint tool and gather results.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The binary name of the tool.
statick_tool.plugins.tool.ruff module¶
Apply ruff tool and gather results.
- class statick_tool.plugins.tool.ruff.RuffToolPlugin[source]¶
Bases:
ToolPluginApply ruff tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
A list of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – The output from the tool.
package – The package to scan.
- Returns:
A list of issues parsed from the output.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to scan.
level – The level of the scan.
files – The files to scan.
user_flags – The user flags to pass to the tool.
- Returns:
The output from the tool.
statick_tool.plugins.tool.shellcheck module¶
Apply shellcheck tool and gather results.
The output from the tool is collected in JSON format to facilitate parsing.
- class statick_tool.plugins.tool.shellcheck.ShellcheckToolPlugin[source]¶
Bases:
ToolPluginApply shellcheck tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level of the scan.
package – The package to scan.
- Returns:
The binary name of the tool.
statick_tool.plugins.tool.spotbugs module¶
Apply spotbugs tool and gather results.
- class statick_tool.plugins.tool.spotbugs.SpotbugsToolPlugin[source]¶
Bases:
ToolPluginApply spotbugs tool and gather results.
- classmethod get_tool_dependencies() list[str][source]¶
Get a list of tools that must run before this one.
- Returns:
List of tool dependencies.
statick_tool.plugins.tool.stylelint module¶
Apply stylelint tool and gather results.
- class statick_tool.plugins.tool.stylelint.StylelintToolPlugin[source]¶
Bases:
ToolPluginApply stylelint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package to process (optional).
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to process.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.uncrustify module¶
Apply uncrustify tool and gather results.
- class statick_tool.plugins.tool.uncrustify.UncrustifyToolPlugin[source]¶
Bases:
ToolPluginApply uncrustify tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level to process (optional).
package – The package to process (optional).
- Returns:
Name of the tool binary.
statick_tool.plugins.tool.val_parser module¶
Apply VAL Parser tool and gather results.
Tool is from King’s College London. Tool authors are:
Maria Fox and Derek Long - PDDL2.2 and VAL
Richard Howey - PDDL2.2 and VAL and Continuous Effects, derived predicates, timed initial literals and LaTeX report in VAL
Stephen Cresswell - PDDL2.2 Parser
https://github.com/KCL-Planning/VAL/tree/master/applications#parser
- class statick_tool.plugins.tool.val_parser.ValParserToolPlugin[source]¶
Bases:
ToolPluginApply Parser tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level to process (optional).
package – The package to process (optional).
- Returns:
Name of the tool binary.
statick_tool.plugins.tool.val_validate module¶
Apply VAL Validate tool and gather results.
Tool is from King’s College London. Tool authors are:
Maria Fox and Derek Long - PDDL2.2 and VAL
Richard Howey - PDDL2.2 and VAL and Continuous Effects, derived predicates, timed initial literals and LaTeX report in VAL
Stephen Cresswell - PDDL2.2 Parser
https://github.com/KCL-Planning/VAL/tree/master/applications#validate
- class statick_tool.plugins.tool.val_validate.ValValidateToolPlugin[source]¶
Bases:
ToolPluginApply Validate tool and gather results.
- gather_args(args: Namespace) None[source]¶
Gather arguments.
- Parameters:
args – Flags for this plugin will be added to these existing arguments.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level to process (optional).
package – The package to process (optional).
- Returns:
Name of the tool binary.
statick_tool.plugins.tool.writegood module¶
Apply writegood tool and gather results.
Website: https://github.com/btford/write-good
- class statick_tool.plugins.tool.writegood.WriteGoodToolPlugin[source]¶
Bases:
ToolPluginApply writegood tool and gather results.
- get_binary(level: str | None = None, package: Package | None = None) str[source]¶
Get tool binary name.
- Parameters:
level – The level to process (optional).
package – The package to process (optional).
- Returns:
Name of the tool binary.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package to process (optional).
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to process.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.xmllint module¶
Apply xmllint tool and gather results.
- class statick_tool.plugins.tool.xmllint.XmllintToolPlugin[source]¶
Bases:
ToolPluginApply xmllint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package to process (optional).
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to process.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.
statick_tool.plugins.tool.yamllint module¶
Apply yamllint tool and gather results.
- class statick_tool.plugins.tool.yamllint.YamllintToolPlugin[source]¶
Bases:
ToolPluginApply yamllint tool and gather results.
- get_file_types() list[str][source]¶
Return a list of file types the plugin can scan.
- Returns:
List of file types.
- parse_output(total_output: list[str], package: Package | None = None) list[Issue][source]¶
Parse tool output and report issues.
- Parameters:
total_output – List of output strings.
package – The package to process (optional).
- Returns:
List of issues.
- process_files(package: Package, level: str, files: list[str], user_flags: list[str]) list[str] | None[source]¶
Run tool and gather output.
- Parameters:
package – The package to process.
level – The level to process.
files – List of files to process.
user_flags – List of user flags.
- Returns:
List of output strings or None.