Wildcards in ignore paths

May 20, 2014 at 7:54 AM
Edited May 20, 2014 at 7: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 5: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": [
May 21, 2014 at 10: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 8, 2014 at 11:31 PM
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.