Andrew Grimm Andrew Grimm - 10 months ago 62
Ruby Question

Equivalent of --fail-level for haml-lint

RuboCop has the

configuration option:


Minimum severity for exit with error code. Full severity name or
upper case initial can be given. Normally, auto-corrected offenses are
ignored. Use A or autocorrect if you'd like them to trigger failure.

Is there an equivalent of that for haml-lint, so that even if a file has warnings, the haml-lint program returns success, so it can be used in CI?

Haml-lint has severity levels:


The severity of the linter. External tools consuming haml-lint output
can use this to determine whether to warn or error based on the lints

but no sign of a


As a workaround, if you only want to test for an Error, choose a single linter that's unlikely to fail:

bundle exec haml-lint --include-linter ClassAttributeWithStaticValue app/views/