-
Notifications
You must be signed in to change notification settings - Fork 24
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
scss:unknown-at-rules creates false positives for @if rules when conditions contains "&&" #82
Comments
Hi @agabrys, Could you please upgrade to the latest version (4.13) and tell me if you can reproduce? Thank you David |
Hi David, Yes, I'll check it and let you know tomorrow. I didn't know that the latest version is 4.13 because the latest version available in SonarQube Update Center is 3.1. |
OK. Thanks! As a side note, all my plugins are no longer available in the Update Center: CSS, JSON, Cucumber Gherkin, Java Properties. |
Thanks! I'll investigate and keep you posted. |
@agabrys: Indeed the |
I changed the example code to:
SonarQube created issues only in
SCSS treats The rule works correctly but I think the message is misleading. Maybe this rule should ignore that code and the "SCSS parser failure" rule should raise an issue? What do you think? |
Hi @agabrys, Thanks for your feedback!
Indeed, it would be nicer if the SCSS parser failed while encountering this kind of syntax. This is something that you could make the SCSS team aware of.
It might be misleading but a prerequisite of the SonarQube plugin is that the files to parse should be syntactically valid.
Strictly speaking, this piece of code is valid CSS code. So, I don't really want to flag it as invalid syntax and raise an issue against "SCSS parser failure". Also, I don't really want to tweak the "scss:unknown-at-rules" rule to not raise this specific issue because strictly CSS-speaking this finding is kind of correct. David |
I understand your point of view and I agree with it 👍 Thank you, I'm closing the ticket. |
I created an issue in the SASS tracking system: sass/sass#2429 |
@racodond Natalie Weizenbaum from SASS team wrote::
So the rule has an issue, but different than I thought at the beginning. |
@agabrys: Thanks for the follow-up! It is really a corner case but I'll try to look at it as soon as I get some free time. |
Hello,
The plugin reported false positives for @if rules when conditions contains
&&
characters.Environment:
Example file:
https://github.com/agabrys/sonarqube-falsepositives/blob/master/src/main/sass/d20171218/unknown-at-rules.scss
Project:
https://github.com/agabrys/sonarqube-falsepositives
Build:
mvn clean package sonar
Best Regards
The text was updated successfully, but these errors were encountered: