sonar-css-plugin icon indicating copy to clipboard operation
sonar-css-plugin copied to clipboard

Parent selector (&) not supported in variable declaration

Open dingo-d opened this issue 7 years ago • 4 comments

I'm getting a

Unable to parse file ... Parse error at line ...

And the error points to

$this: &;

the & character.

This is a perfectly valid SCSS syntax, how come it's throwing errors?

dingo-d avatar Oct 12 '18 08:10 dingo-d

Same issue here using v4.18:

[linux_eslint] ERROR: Parse error at line 35 column 10:
[linux_eslint] 
[linux_eslint] 29: $panelPosLeft: (xs: translateX(100%), lg: none);
[linux_eslint] 30: $panelLeft: (xs: -100%, lg: 0);
[linux_eslint] 31: $panelGlobalDimension: (xs: calc(100vh - 60px), lg: auto);
[linux_eslint] 32: $panelTransition: (xs: transform $timing0-3 ease, lg: none);
[linux_eslint] 33: 
[linux_eslint] 34: .navigation {
[linux_eslint] 35:   $root: &;
[linux_eslint]              ^

Can you please confirm if it's going to be fixed in v4.19, and when this version will be available?

Thanks

emexelem avatar Nov 07 '18 18:11 emexelem

I built https://github.com/racodond/sonar-css-plugin/pull/118 locally, it's working fine.

emexelem avatar Nov 13 '18 11:11 emexelem

Let's hope it's merged to the plugin soon. :)

dingo-d avatar Nov 13 '18 11:11 dingo-d

Hi,

The issue is indeed fixed. As you can see in the builds, everything works fine for the LTS version (6.7), but not for the latest release (issue related to custom rules, nothing related to this issue). I just want to find some time to fix the issue related to the latest SonarQube version before releasing a version fixing this issue.

David

racodond avatar Nov 13 '18 16:11 racodond