6.2.11.6. ImportPMD¶
Run PMD and import its results
Runs PMD 7.3 or later on the files in
source_directories and imports its
violations. By default, PMD's rulesets/java/quickstart.xml ruleset
is applied; set config_file to apply another one.
Use exclude_paths to skip generated sources.
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_messages_in_system_headers, excludes, includes, justification_checker, post_processing, provider, severity
The following places define options that affect this rule: Analysis-GlobalOptions
additional_args¶
additional_args : list[str] = ['--no-fail-on-violation', '--no-fail-on-error', '--no-progress', '--no-cache']
check_returncode¶
check_returncode : bool = True
Whether a non-zero exit status of the tool fails the rule. Turn it off for tools that report findings through their exit status, as many linters do.
Independent of this option, a run that imports no violations while the tool exits non-zero fails: its results are indistinguishable from a run in which the tool found nothing.
config_file¶
config_file : bauhaus.analysis.config.PlainPath = 'rulesets/java/quickstart.xml'
Configuration file for the PMD tool, relative to cwd.
Defaults to rulesets/java/quickstart.xml.
cwd¶
cwd : bauhaus.analysis.config.LayerRelativePath | None = None
encoding¶
encoding : str = 'utf-8'
encoding_error_handler¶
encoding_error_handler
Type: EncodingErrorHandler
Default:
'IGNORE'
The strategy to handle encoding errors during processing of the output of the executed command.
STRICT: abort with on error on encoding errors,IGNORE: ignore encoding errors (accepting data loss),REPLACE: replace problematic code points with a question mark (?).
environment¶
environment : dict[str, str] = {}
exclude_paths¶
exclude_paths : list[bauhaus.analysis.config.PlainPath] = []
--exclude.
executable¶
executable : bauhaus.analysis.config.PlainPath | None = None
source_directories¶
source_directories : list[bauhaus.analysis.config.PlainPath] = []
-d.
Option Types¶
These types are used by options listed above:
EncodingErrorHandler¶
STRICT
IGNORE
REPLACE