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

Indentation rule - Incorrect mixed spaces / tabs warnings #382

Closed
DanPurdy opened this issue Nov 10, 2015 · 5 comments · Fixed by #725
Closed

Indentation rule - Incorrect mixed spaces / tabs warnings #382

DanPurdy opened this issue Nov 10, 2015 · 5 comments · Fixed by #725
Labels

Comments

@DanPurdy
Copy link
Member

So this is two issues really, first raised in #373

sass-lint @ 1.3.2
node @ any version

The error being thrown in #373 is because it's checking for a non existent node content block when files are using CRLF line endings.

This seems to actually hide the real issue though which is an issue where CRLF endings are throwing false mixed spaces and tabs warnings. On first look this is due to the regex for whitespace matching new line characters when dealing with CRLF as we're manually slicing the content array and only taking into account the length of \n rather than \r\n as well.

Use the file uploaded in #373 and make sure your editorconfig/IDE doesn't auto format the line endings and you'll be able to test this.

@mlenser
Copy link

mlenser commented Dec 2, 2015

Definitely experiencing this on Windows. Please fix.

@EnoahNetzach
Copy link

I'm experiencing this also with a sequence of \n\t (using a tab character after a LF)

@mlenser
Copy link

mlenser commented Jun 16, 2016

@bgriffith does this also fix the CRLF issue on windows?

@DanPurdy
Copy link
Member Author

@mlenser Yes it will do, we test every rule with CRLF line endings on Appveyor as well as LF on Travis now. We'll release this in 1.8.0. I fixed an issue with the AST that means CRLF should be providing correct warnings across the board now.

I've also added support for tabs with the indentation fixes.

Keep an eye out for 1.8 👍

@mlenser
Copy link

mlenser commented Jun 16, 2016

@DanPurdy Awesome! Thank you so much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants