6.2.11.9. ImportQMLLint¶
Run qmllint and import its results
Runs qmllint on the QML files matching qml_files and imports its messages as analysis violations.
qmllint reads its own .qmllint.ini settings file. To ignore it, add
--ignore-settings to additional_args.
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] = []
check_returncode¶
check_returncode : bool = False
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.
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] = {}
executable¶
executable : bauhaus.analysis.config.PlainPath | None = None
qml_files¶
qml_files : list[bauhaus.analysis.config.FileGlobPattern] = ['**/*.qml']
QML file names (interpreted relative to cwd).
The globbing patterns use Python glob.glob(..., recursive=True),
so that ** can be used for recursive directory matching.
qmllint_regexp¶
qmllint_regexp : str = '(?P<severity>[^:]+): (?P<filename>([A-Za-z]:)?[^:]+):(?P<line>\d+):((?P<column>\d+):)? (?P<message>.+) \[(?P<errno>.+)\]'
use_json¶
use_json : bool = True
qmllint >= 6 exports findings in JSON format, which is imported
instead of parsing the textual output on the console. If you are using
qmllint < 6, set this option to false, as it has no JSON output.
Option Types¶
These types are used by options listed above:
EncodingErrorHandler¶
STRICT
IGNORE
REPLACE