Andrew Grimm Andrew Grimm - 1 year ago 88
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

Answer Source

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/
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download