Severity and exit codes
Every rule carries a level, and every alint check returns an exit code. The level decides how loud a finding is; the exit code is what your CI gates on. The mapping is small and fixed.
The four levels
Section titled “The four levels”erroris a hard failure. Any error-level violation makesalint checkexit non-zero, which is what fails a CI job or blocks a commit.warningis reported but does not fail the run by default. Pass--fail-on-warningto promote warnings into failures when you want a stricter gate.infois advisory. It shows in the report and never affects the exit code.offdisables the rule entirely: it is dropped at config load and never runs. Settinglevel: offon an inherited rule is how you switch off something a ruleset youextends:turned on.
The exit codes
Section titled “The exit codes”alint check returns one of four codes, so a pipeline can tell “clean” from “found problems” from “misconfigured”:
0clean: no errors, and no warnings under--fail-on-warning.1findings: at least one error, a warning while--fail-on-warningis set, or a stale baseline entry while--strict-baselineis set.2a bad config or bad usage (an unknown field, a malformed.alint.yml, an invalid flag).3an internal error (a bug). Distinct from2so CI can tell “your config is wrong” apart from “alint fell over.”
In practice
Section titled “In practice”A CI step that blocks on errors is just alint check (a non-zero exit fails the job). To also block on warnings during a hardening push:
alint check --fail-on-warningAnd to keep a rule in the config but stop it from firing, without deleting it:
rules: - id: legacy-header level: off # inherited from a ruleset; silenced hereGoing deeper
Section titled “Going deeper”- The config model covers where
levelsits in the rule record and how a child config overrides it. - How alint works shows where the report and its exit code are produced.