Skip to content

--exclude-list doesn't seem to work on folders #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nschonni opened this issue Feb 7, 2013 · 5 comments
Closed

--exclude-list doesn't seem to work on folders #345

nschonni opened this issue Feb 7, 2013 · 5 comments

Comments

@nschonni
Copy link
Member

nschonni commented Feb 7, 2013

As part of the discussion in #330, I was testing the --exclude-list inside .csslintrc and directly from the CLI.

$ csslint . --exclude-list=build/

csslint: No errors in ./build/lib/vendors-9180e3f10adb49bf0394b66191b58ba7/gems/
compass-0.12.2/test/fixtures/stylesheets/blueprint/css/ie.css.

...
@nzakas
Copy link
Contributor

nzakas commented Feb 7, 2013

Assuming you are using 0.9.10?

@jklein - would you mind taking a look?

@nschonni
Copy link
Member Author

nschonni commented Feb 7, 2013

Yes, 0.9.10, tested on 2 Windows machines both with bash shell and dos.

@jklein
Copy link
Contributor

jklein commented Feb 7, 2013

I'll look at this shortly, but in the meantime can you try using an absolute path?

@nschonni
Copy link
Member Author

nschonni commented Feb 7, 2013

Using an absolute patch doesn't help

C:\Workspace\wet-boew>csslint --exlude-list=C:\Workspace\wet-boew\build\  .                                                                                                                                                                

csslint: There are 7 problems in ./build/lib/vendors-9180e3f10adb49bf0394b66191b58ba7/gems/compass-0.12.2/test/fixtures/stylesheets/blueprint/css/ie.css.

ie.css                                                                                                                                                   
1: warning at line 4, col 13
Values of 0 shouldn't have units specified.
    margin: 0px -8px 16px 0;

@jklein
Copy link
Contributor

jklein commented Feb 8, 2013

Okay so this is a bug, or more realistically a fragile implementation of this functionality. Basically the matching between the exclude list and the list of files to list isn't as robust as one might like, and you need to specify the files in the correct way. So the workaround is to do:

csslint . --exclude-list=./build

Not ideal. I'll work on improving this and submit a patch, but in the meantime this should get you up and running. Essentially the prefix that is going to go in front of all of the files to be linted (in this case ./) must go in front of all of the files that are being excluded.

@nzakas nzakas closed this as completed in 872e554 Feb 8, 2013
nzakas added a commit that referenced this issue Feb 8, 2013
Fixes #345 - Using absolute paths for the excluded files and the files t...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants