CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.77k stars 483 forks source link

How to exclude all .min.css files? #635

Open SeanHayes opened 8 years ago

SeanHayes commented 8 years ago

These don't work:

csslint --exclude-list=*.min.css .
csslint --exclude-list=static/css/*.min.css .

Only giving the exact path to a single file works. Is there another way that supports regex or glob patterns?

caugner commented 8 years ago

Is there another way that supports regex or glob patterns?

There is currently no way except resolving the files outside of csslint, e.g. in a bash script (see StackOverflow for hints on how to create a comma-separated list of files).

The reason for this lays in the way csslint currently resolves the files to lint.

mistermashu commented 7 years ago

this is how I did that in a bash script. I'm only decent at shell scripts but this works like a charm!

CSSFILES=$(find . -type f -name "*.css" -not -name "*.min.css"
for i in $CSSFILES; do
    csslint --format=compact $i
done
mcandre commented 4 years ago

Frankly, it would be good of csslint to do this by default, for all *-min* and *.min.* results.