RuboCop has the
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.
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
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/