Help with Sonar CSS plugin

I had our IT add the Sonar CSS plugin (https://github.com/racodond/sonar-css-plugin) but the number next to the rules lets me think its not right:
image

Can someone a) verify for me that its not correct and b) give me some advice on what they should do. I sadly can’t touch any of it so i don’t know what they did.

Thanks,

Philipp

Hello,

this is correct, SonarCSS plugin has 30 rules for now. This is a new plugin we’ve just started, we will continue adding new rules in future releases.

ps. if you need to compare your local instance with some reference, you can check https://next.sonarqube.com/sonarqube/coding_rules , which is our instance of SonarQube we use at SonarSource . This is version compiled from latest sources and eventually it will be next release.

Thank you for answering so fast. Can you help me understand why it has different numbers on the github page?

Which page are you referring to? This is probably some other plugin, rules for SonarCSS plugin can be browsed here https://rules.sonarsource.com/css (there are only 24 specific for CSS, 6 rules are common for all languages - duplication, etc…)

Philipp,

The sonar-css-plugin you linked is not maintained by SonarSource. SonarSource has, however, created their own CSS analyzer plugin (which Tibor is referencing). It appears that your IT department installed SonarSource’s CSS analyzer rather than the one you linked. The github repo for the “official” SonarCSS analyzer is located here: https://github.com/SonarSource/sonar-css

Having used the sonar-css-plugin that you linked: it’s pretty noisy and not updated very often. Updates also don’t appear in the marketplace as the maintainer has, so far as I understand it, left the SonarQube community.

I would reccomend going with SonarSource’s CSS plugin, since it’s more “official” and you are guaranteed some level of support through forums like this for false-positives, reccomending new rules, etc.

Colin

3 Likes

Thank you Colin and Tibor. I will use the SonarSource one for sure then. Thanks for the input!