csslint icon indicating copy to clipboard operation
csslint copied to clipboard

How to exclude all .min.css files?

Open SeanHayes opened this issue 10 years ago • 3 comments

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?

SeanHayes avatar Jan 23 '16 08:01 SeanHayes

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.

caugner avatar Aug 07 '16 15:08 caugner

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

mistermashu avatar Apr 04 '17 19:04 mistermashu

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

mcandre avatar Sep 12 '20 17:09 mcandre