statick_tool.plugins.discovery package

Module contents

Default discovery plugins for statick.

Submodules

statick_tool.plugins.discovery.c module

Discover C files to analyze.

class statick_tool.plugins.discovery.c.CDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover C/C++ files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for C files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.cmake module

Discovery plugin to find CMake-based projects.

From the CMake manual, valid CMake files are named CMakeLists.txt and *.cmake. This module will find those files and make them available as part of the package data.

https://cmake.org/cmake/help/latest/manual/cmake-language.7.html

The contents of CMakeLists.txt is used to discover make targets and header files for the current package. That information is made available as part of the package data.

class statick_tool.plugins.discovery.cmake.CMakeDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discovery plugin to find CMake-based projects.

gather_args(args: Namespace) None[source]

Gather arguments.

Parameters:

args – Flags for this plugin will be added to these existing arguments.

classmethod get_discovery_dependencies() list[str][source]

Get a list of plugins that must run before this one.

Returns:

List of plugin names.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

classmethod process_output(output: str, package: Package) None[source]

Parse the tool output.

Parameters:
  • output – The output to parse.

  • package – The package to update.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for CMake files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.css module

Discover CSS files to analyze.

class statick_tool.plugins.discovery.css.CSSDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover CSS files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for CSS files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.dockerfile module

Discover Dockerfile files to analyze.

class statick_tool.plugins.discovery.dockerfile.DockerfileDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover Dockerfile files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for Dockerfile files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.groovy module

Discover Groovy files to analyze.

class statick_tool.plugins.discovery.groovy.GroovyDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover Groovy files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for Groovy files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.html module

Discover HTML files to analyze.

class statick_tool.plugins.discovery.html.HTMLDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover HTML files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for HTML files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.java module

Discover Java files to analyze.

class statick_tool.plugins.discovery.java.JavaDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover Java files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for java files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.javascript module

Discover JavaScript files to analyze.

class statick_tool.plugins.discovery.javascript.JavaScriptDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover JavaScript files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for JavaScript files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.markdown module

Discover Markdown files to analyze.

class statick_tool.plugins.discovery.markdown.MarkdownDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover Markdown files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for Markdown files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.maven module

Discover Maven POM files to analyze.

class statick_tool.plugins.discovery.maven.MavenDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover Maven files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for maven files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.pddl module

Discover PDDL files to analyze.

class statick_tool.plugins.discovery.pddl.PDDLDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover PDDL files to analyze.

classmethod discover_pddl_file_type(filename: str) str[source]

Determine the type of PDDL file that was discovered.

Parameters:

filename – The name of the file to check.

Returns:

The type of PDDL file.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for PDDL files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.perl module

Discover Perl files to analyze.

class statick_tool.plugins.discovery.perl.PerlDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover Perl files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for Perl files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.python module

Discover python files to analyze.

class statick_tool.plugins.discovery.python.PythonDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover python files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for python files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.ros module

Discovery plugin to find ROS packages.

class statick_tool.plugins.discovery.ros.RosDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discovery plugin to find ROS packages.

classmethod deep_get(dictionary: str | dict[Any, str], keys: str, default: str = '') Any[source]

Safe way to check for a value in a nested dict.

Copied from:

https://stackoverflow.com/questions/25833613/python-safe-method-to-get-value-of-nested-dictionary

Parameters:
  • dictionary – The dictionary to search.

  • keys – The keys to search for.

  • default – The default value if the key is not found.

Returns:

The value found or the default value.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for ROS package files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.rst module

Discover rst files to analyze.

class statick_tool.plugins.discovery.rst.RstDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover rst files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for rst files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.shell module

Discover shell files to analyze.

class statick_tool.plugins.discovery.shell.ShellDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover shell files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for shell files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.tex module

Discover TeX files to analyze.

class statick_tool.plugins.discovery.tex.TexDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover TeX files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for TeX files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.xml module

Discover XML files to analyze.

class statick_tool.plugins.discovery.xml.XMLDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover XML files to analyze.

get_name() str[source]

Get name of discovery type.

Returns:

Name of the discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for XML files.

Parameters:
  • package – The package to scan.

  • level – The level of scanning.

  • exceptions – Optional exceptions to apply.

statick_tool.plugins.discovery.yaml module

Discover YAML files to analyze.

class statick_tool.plugins.discovery.yaml.YAMLDiscoveryPlugin[source]

Bases: DiscoveryPlugin

Discover YAML files to analyze.

get_name() str[source]

Get name of discovery type.

scan(package: Package, level: str, exceptions: Exceptions | None = None) None[source]

Scan package looking for YAML files.

Parameters:
  • package – The Package object that was analyzed.

  • level – Name of the level used in the scan.

  • exceptions – Optional exceptions to filter out files.

Returns:

None