I have a rails application with CircleCI setup. I am using a gem
called css_lint
which returns the list of errors if the commit contains any CSS file error. Errors are returned but the build does not fail. I am also using set -e
in the beginning. Below is my code. Please suggest how to fail my build in case of errors.
- run:
name: Run css_lint
command: |
set -e
git diff -z --name-only --diff-filter=d origin/master...HEAD | grep -z -Z '.css$' | xargs -r -0 css_lint --errors=box-sizing,display-property-grouping,duplicate-properties,empty-rules,errors,known-properties