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 false positive in border-zero #890

Closed
wants to merge 1 commit into from

Conversation

richarddewit
Copy link
Contributor

What do the changes you have made achieve?
This fixes a false positive when convention is set to the integer 0 (as opposed to the string, which does work), by casting the convention to a string.

Are there any new warning messages?
No

Have you written tests?
No but I've tested it manually

Have you included relevant documentation
Not necessary

Which issues does this resolve?
#861

<DCO 1.1 Signed-off-by: Richard de Wit henk.exe@gmail.com>

This fixes a false positive when `convention` is set to the integer `0` (as opposed to the string, which does work), by casting the `convention` to a string.

Fixes sasstools#861
@coveralls
Copy link

coveralls commented Oct 17, 2016

Coverage Status

Coverage remained the same at 97.527% when pulling 51ecc39 on richarddewit:patch-1 into b7bcb3a on sasstools:develop.

@@ -29,7 +29,7 @@ module.exports = {
var node = item.content[0];
if (node.type === 'number' || node.type === 'ident') {
if (node.content === '0' || node.content === 'none') {
if (parser.options.convention !== node.content) {
if (('' + parser.options.convention) !== node.content) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @richarddewit - Thanks for the PR! Just one thing - while the solution is valid, could we be a bit more descriptive and use .toString() instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I've done this just for brevity

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richarddewit If you'd like to update it use this instead and possibly add a test where the convention is set as a number not a string in the config file then we'd be happy to merge this fix. Thanks again for taking the time! 👍

@bgriffith
Copy link
Member

Closing this for #913. Thanks again @richarddewit 👍

@bgriffith bgriffith closed this Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants