csslint

csslint: how to exclude directories from command line?


I want to exclude all vendor directories (ex.: public/css/vendor ) using csshint, but when I run the following command:

csslint --format=lint-xml --exclude-list=/vendor/ /var/lib/jenkins/workspace/project/src > /home/user/Desktop/test.xml

nothing happens! Can anybody help me with this?

I got an example from here:

https://github.com/CSSLint/csslint/wiki/command-line-interface

Thanks!


Solution

  • My problem was:

    When u run the command u must specify the path in the exclude-list.

    Example:

    csslint --format=lint-xml --exclude-list=/var/lib/jenkins/workspace/project/src/folder /var/lib/jenkins/workspace/project/src > /home/user/Desktop/test.xml.
    

    I can't give him a pattern, only a file or dir with full path.