Hello
I am using sonar scanner 3.2.0.1227 on Ubuntu 18.04. I use sonar.issue.ignore.multicriteria for ignoring several rules from rats and cppcheck, no problem. But I can’t get that to work on “common-c” rules. Tried for both InsufficientLineCoverage and InsufficientCommentDensity, doesn’t seem to do anything. Tried with prefix “common-c:” or “c:” or nothing.
Thanks
Brice
Hi @bgoglin,
Sorry for the delay in replying to you.
In fact, as descrbide in the related documentation, exclusion parameters should be set in at UI (or web service) level, and not at scanner level.
Regards,
Julien Lancelot
Hello
Thank you, I’ll try that.
It’d be nice to clarify why exclusion works for some rules and not for others.
Brice
Indeed @julienlancelot it works. But when you want to ignore 25 rules, duplicating a text configuration file is muuuuuuuch easier than duplicating 25 lignes in every project/branch in a web interface. Is there a way to factorize these rules somewhere to avoid the annoying duplication whenever I add a new project/branch or a new rule?
Thanks
Hi @bgoglin,
First of all, first for confirming that you were able to make it work using server settings.
Now, about the way to configure many project/branch => For branches, no need to do anything as long as it’s done at project level !
You can also use web service api/settings/set to automate this on many projects.
I’ve a question for you : why do you need to ignore so many rules ? Why don’t you ignore them in your quality profile ?
Thanks @julienlancelot, I asked my admin to create a quality profile, that’s indeed a good way to factorize all this, and seems to work fine. Most of the rules we are ignoring are dumb reports from cppcheck such as “you need 25% more comments in your code”, or “this FIXME should be handled”, and many other things that are obvious.
I’m happy to read that using Quality Profiles is solving your issue !
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.