6.1.2.15. QMLLintIntegration

Execute qmllint on *.qml files

This rule calls qmllint with the given options and QML input files.

Options

The following places define options that affect this rule: BuildSystemIntegration, Project-GlobalOptions

abort_on_error

abort_on_error : bool = True

If set to true and the build step returns a non-zero exit-code, the build is aborted. Otherwise a non-zero exit-code is logged but the build continues.
 

options

options : str | None = None

Additional command-line parameters for qmllint.
 

qml_files

qml_files : list[bauhaus.analysis.config.FileGlobPattern] = ['**/*.qml']

QML file names (interpreted relative to /Project/directory).

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>.+)\]'

Regular expression matching the qmllint command-line output (when using Text format).
 

toolname

toolname : str = 'qmllint'

qmllint command-line tool to call.
 

use_json

use_json : bool = False

qmllint >= 6 can export findings in JSON format. Enabling this option makes use of this feature in order to import findings via structured JSON format instead of parsing the textual output on the console. If you are using qmllint < 6, you have to leave this option at false as qmllint < 6 does not have the JSON output option.