This project is read-only.

Wildcards in ignore paths

May 20, 2014 at 8:54 AM
Edited May 20, 2014 at 8:54 AM
I'm using Jasmine to test JavaScript, and using reference comments
/// <reference path="../../jasmine.js"/>
to include jasmine and the file(s) to test. This means that my tests include a lot of code that JSLint.NET isn't aware of.

All my tests end with ".test.js". Is there a way to ignore file extensions?

I've tried "*.test.js" and ".test.js", they don't work.

(Even better would be if JSLint.NET would understand the references.)
May 21, 2014 at 6:11 AM
There are a few questions here, but I'll try to get to the core of the problem.

If you want to skip your tests, my advice would be to organize them under a single folder and then ignore everything under it. So if all your tests are in a \tests\ folder, add that to your ignore list:
"ignore": [
    "\\tests\\"
]
May 21, 2014 at 11:36 AM
Thank you, that's a neat work-around and definitely a possible solution to my core problem.

Regarding the question itself, it seems that ignore strings can only match the beginning of the path.
Jun 9, 2014 at 12:31 AM
Correct, the ignore paths are not "globs" as you might expect. They're "starts with" folder paths (or file paths if they end with a lintable extension).

It turns out this is much easier to maintain and covers 99% (or more) of actual use cases.