Run Linter
Description
The Run Linter action lints a project or a folder and succeeds or fails according to the thresholds you set.
It uses the same engine, the same rule packs and the same hop-lint.yml as hop lint, so the two give the same findings and the same outcome on the same project.
A scheduled or pre-deployment lint becomes an ordinary workflow, which runs on Hop Server and in containers without wrapping hop lint in a Shell action.
The action is part of the Lint plugin. See Installing.
The name avoids confusion with Tools → Lint → Lint Project in Hop Gui, which shows the findings in a window instead.
Options
| Option | hop lint |
Description |
|---|---|---|
Project or folder |
|
The folder to lint.
Leave it empty to lint the current project ( |
Include metadata |
|
Lint the metadata files in the folder too, such as connections, not only pipelines and workflows. On by default. |
Config file |
|
A |
Minimum severity |
|
Report only findings at this severity or above, in the result rows and the report.
It does not change whether the action fails, nor the counts in the variables. Default |
Fail on |
|
Fail when a finding reaches this severity: |
Max warnings |
|
Fail when more warnings than this are found. Leave it empty for no limit. |
Baseline file |
|
Ignore the findings recorded in this file with |
Report file |
|
Write the report to this file. Leave it empty to write no report. |
Report format |
|
|
Result
-
The action succeeds or fails according to Fail on and Max warnings.
-
One result row per reported finding, with the fields
severity,rule_id,rule_name,message,file,element_typeandelement_name. -
Variables for the actions that follow:
Variable Value LINT_ERRORSThe number of errors
LINT_WARNINGSThe number of warnings
LINT_INFOSThe number of informational findings
LINT_REPORT_FILEThe report file, or empty when none is written
The counts leave out the findings in the baseline, and include those below the minimum severity.
-
The report file is added to the result files, so a Mail action can attach it.
The action lints even when the linter is switched off under Configuration → Linter: that switch is for Hop Gui.
The action fails with an error, rather than on its findings, when the folder does not exist, or when the project’s hop-lint.yml, the config file or an installed rule pack cannot be read.
The error names the file or pack and what is wrong with it.