Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix erroneous directory reads #719

Merged
merged 6 commits into from
Jun 7, 2016

Conversation

DanPurdy
Copy link
Member

@DanPurdy DanPurdy commented May 17, 2016

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]>

@DanPurdy DanPurdy added this to the 1.8.0 milestone May 17, 2016
@coveralls
Copy link

coveralls commented May 17, 2016

Coverage Status

Coverage remained the same at 97.271% when pulling 24c9a59 on DanPurdy:feature/fix-directory-reads into b2f8523 on sasstools:develop.

@coveralls
Copy link

coveralls commented May 18, 2016

Coverage Status

Coverage remained the same at 97.271% when pulling 44ad9ac on DanPurdy:feature/fix-directory-reads into b2f8523 on sasstools:develop.

@coveralls
Copy link

coveralls commented May 18, 2016

Coverage Status

Coverage remained the same at 97.271% when pulling 63b427e on DanPurdy:feature/fix-directory-reads into b2f8523 on sasstools:develop.

@coveralls
Copy link

coveralls commented Jun 6, 2016

Coverage Status

Coverage remained the same at 97.271% when pulling d3c9b31 on DanPurdy:feature/fix-directory-reads into 4970c3c on sasstools:develop.

@bgriffith bgriffith merged commit 66ab2d5 into sasstools:develop Jun 7, 2016
@DanPurdy DanPurdy deleted the feature/fix-directory-reads branch June 7, 2016 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: EISDIR: illegal operation on a directory
3 participants