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

Different number of variables on Windows/Linux shell #179

Open
XhmikosR opened this issue Nov 23, 2021 · 1 comment
Open

Different number of variables on Windows/Linux shell #179

XhmikosR opened this issue Nov 23, 2021 · 1 comment

Comments

@XhmikosR
Copy link
Owner

XhmikosR commented Nov 23, 2021

On Ubuntu:

> node ./cli.js tests/ --ignore="$a,$b"

Looking for unused variables
Searching for unused variables in "/home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests" folder, scss files...
11 total variables.
8 are not used!
Variable $a is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:2
Variable $b is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:3
Variable $unused is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:4
Variable $black is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:5
Variable $ignored-variable is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:13
Variable $enabled-variable is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:19
Variable $nestedVar is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/test.scss:7
Variable $nestNestedVar is not being used! /home/runner/work/find-unused-sass-variables/find-unused-sass-variables/tests/test.scss:12

On Windows:

> node ./cli.js tests/ --ignore="$a,$b"

Looking for unused variables
Searching for unused variables in "D:\a\find-unused-sass-variables\find-unused-sass-variables\tests" folder, scss files...
9 total variables.
6 are not used!
Variable $unused is not being used! D:/a/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:4
Variable $black is not being used! D:/a/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:5
Variable $ignored-variable is not being used! D:/a/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:13
Variable $enabled-variable is not being used! D:/a/find-unused-sass-variables/find-unused-sass-variables/tests/_variables.scss:19
Variable $nestedVar is not being used! D:/a/find-unused-sass-variables/find-unused-sass-variables/tests/test.scss:7
Variable $nestNestedVar is not being used! D:/a/find-unused-sass-variables/find-unused-sass-variables/tests/test.scss:12

It seems that the ignore CLI option isn't respected on Linux. Maybe we need to escape $?

@XhmikosR
Copy link
Owner Author

XhmikosR commented Apr 2, 2023

So, it seems that on Ubuntu ignores aren't respected at all. Unsure if it's a combination of our npm test script and Ubuntu or if it happens with normal CLI usage on Ubuntu too.

@XhmikosR XhmikosR changed the title Different number of variables on Windows Different number of variables on Windows/Linux shell Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant