6.2.10. ImportExternalAnalysisOutput¶
Call an external analysis and capture its output
Runs an external tool as a sub-process and parses violations from its stdout/stderr output using one of the configured ExternalAnalysisFormats.
This can be used to include third-party tools (e.g. lint)
in the Axivion analysis.
You can copy this rule if you need to run multiple external tools.
Possible Messages
This rule has no predefined messages.
6.2.10.1. Options¶
This rule shares the following common options: exclude_messages_in_system_headers, excludes, includes, justification_checker, post_processing, severity
The following places define options that affect this rule: Analysis-GlobalOptions
capture_stderr_provider¶
capture_stderr_provider : str | None = None
provider option
of a rule in the
ExternalAnalysisFormats group.
capture_stdout_provider¶
capture_stdout_provider : str | None = None
Provider to capture the shell stdout output of the given analysis tool. If given, the shell stdout output will be captured and matched against the regexes as configured for the provider.
This option should be set to same value as the provider option
of a rule in the
ExternalAnalysisFormats group.
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.
command¶
command : str = ''
cwd¶
cwd : bauhaus.analysis.config.LayerRelativePath | None = None
encoding¶
encoding : str = 'utf-8'
encoding_error_handler¶
encoding_error_handler : EncodingErrorHandler = '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] = {}
execute_as_shell_command¶
execute_as_shell_command : bool = False
options¶
options : list[str] = []
prepend_path_prefix¶
prepend_path_prefix : bauhaus.analysis.config.PlainPath | None = None
strip_path_prefix¶
strip_path_prefix : bauhaus.analysis.config.PlainPath | None = None
6.2.10.2. Option Types¶
These types are used by options listed above:
EncodingErrorHandler¶
STRICT
IGNORE
REPLACE