Open Reinmar opened 8 years ago
Why not keeping it smart and instead make "all" return just the files that need to be scanned (= '**/*.js'
- .gitignore
)?
We would need to create such list, what may not be that easy. Currently we just pass two lists – the paths to check and the paths to ignore. Question is whether all()
can return both things at the same time, like:
[ '**/*.js', '!node_modules', ... and other ignored dirs marked with '!' ]
If that's possible, then we're home. If not, then we would need to resolve such list on our own. There's definitely a module to do that, but it's generally more work.
8s for 19 files is extremely bad result. The reason for that is this piece of code:
So basically we tell linters that they should first get all files inside the whole repo (including the whole
node_modules/
and Bender files and only later on we are saying that some of them should be excluded.I think that we tried to make it too smart by saying "scan all files in the repo excluding these which are ignored by Git.". This is both, complicated and as we can see extremely slow. I would simplify this and say that you need to configure more precisely which directories should be checked. So the minimum changes is to make the array returned by that
all()
callback configurable from thegruntfile.js
.