-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add MISRA C 2012 Amendment 1 rules supported by PC-Lint #1856
Comments
Hello @farshield, Which tool to create the messages are you using? Regards, |
Hello @guwirth, I'm using PC-Lint Plus v1.3 to create the XML report and use the PCLintSensor ( For the sonar-scanner I'm using (v4.3.0.2102-linux), I added the following lines to the "sonar-project.properties" file:
Regards |
Hello @farshield , I need some more time to verify this, but maybe you can have a look by yourself: Available rules: Maybe rule is missing? Parsing is wrong... Regards, |
@farshield looking into pclint.xml there is no item For my understanding new rules of
are missing? @farshield can you provide these new rules / extend the XML file? Misra publications: |
@guwirth Indeed this is the case, the rules for MISRA C 2012 AMD-1 are missing. I will try to create first a list of missing rules. Then I will try to add them to the XML file and create a PR if nobody else will create the PR before. Later edit:
|
Means there are more MISRA C 2012 rules missing in the XML but these are not supported by PC-Lint? |
Correct. Here is a list of MISRA C 2012 AMD-1 supported rules found in the documentation of the latest PC-Lint Plus (v1.3.5-beta): |
closed with #1857 |
There is no definition for MISRA 2012 Rule 21.15, however a similar rule called "L0857" exists.
If I submit the following report to Sonarqube, the issue is ignored and can not be seen in "code smells":
However, if I remove the text "Rule 21.15" from the description field of the XML file and submit the report again, I'm able to see the issue in Sonarqube under L0857.
I created a custom rule with the key "M2012_21_15" and then changed the key in Postgresql to "M2012-21.15". I had to do this hack because of input validation when creating the key - I could not use special characters like the dash or the dot so I had to rename it from the database. I labeled it "misrac3" after that.
Once I renamed the key I was able to report the issue and see it in Sonarqube.
Sorry for the offtopic: The best approach would be to add it to the plugin, but in the meantime is there an easier way to rename the key? Especially if I'm using H2 databases (I wasn't able to rename it from H2).
The text was updated successfully, but these errors were encountered: