Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The default glob pattern globs
**/*.scss
which means it would in rare cases return a path which is a directory.For example with the following structure.
/o.scss/p.scss
it would return['o.scss', 'p.scss']
as our matching glob array.This structure can actually be found in sass-graph, a dependency of node-sass, so if you were to run sass-lint without any project specific paths/globs then you would most likely start to lint your node modules which very probably include node-sass.
I believe this is the main reason for #555
The fix is simply to pass the
nodir
option to glob when it syncs our array of files to lint.I benchmarked it against doing our own fs.statSync calls and it was massively faster as expected.
Added tests for the CLI and main.
Fixes #555
<DCO 1.1 Signed-off-by: Dan Purdy [email protected]>