New feature to report unknown rules / warnings#2606
New feature to report unknown rules / warnings#2606jenspopp wants to merge 2 commits intoSonarOpenCommunity:masterfrom
Conversation
|
Hi @jenspopp, thanks for providing this I will have a look to it. Regards, |
|
@jenspopp thx for fixing the tests |
Hi, please note that some tests will fail with Java 17 due to some Exception changes in 17.... |
|
Risk too high to add this to V2.1 version,will be merged into V2.2 version. |
|
@jenspopp I like to start merging this pull request ... Are you still using it? Any additional comments/experiences? |
|
Hi, we are using it for a few month now. Since it is only 2 projects, it is not to big of a user base, but it helped already to identify some potential issues. We use an opensuse leap with latest gcc compilers to detect potential risks early on, and that works. Out current Sonar is LTS 9.9(.2) |
|
@jenspopp For my understanding: Why did you decide to load the rules from the server? An alternative would have been to read the rules from the plugin, as the XML files are part of it. |
|
Sorry, been a while. But if I remember correctly, it was to allow the user to create a new rule (e.g. if a new compiler warning is introduced) in sonar web ui, without changing the code/xml files. |
Yes you are right that's possible with template rules. |
|
@jenspopp What is the use case of changing the |
|
If I read my comments correctly, it was to be able to configure the rule id set to unknown rules. This can also be a fixed value in code... I think if the id was not found, there would be no error/warning in sonar otherwise...
|
|
Hi @jenspopp, struggling a little bit with the key for the unknown rule:
Also think severity should be INFO and type CODE_SMELL <rule>
<key>unknown</key>
<name>Unknown compiler warnings</name>
<description>
Unknown compiler warnings.
</description>
<severity>INFO</severity>
<type>CODE_SMELL</type>
</rule>What are you thinking? Regards, |
This is a fix for #2586
I tested it with gcc, cppcheck and clangtidy.
Open points:
close #2586
This change is