When analyzing the code in the GUI by either creating a project, opening a project file or clicking "Reanalyze all files", inline suppressions are being ignored. However, if I select all of the selected files, right click and select Recheck, all inline suppressions will disappear from the list of issues.
In my specific case I verified this on a test project by adding // cppcheck-suppress unusedFunction above the definition of a function that is not called from anywhere else in the program. Using the methods listed in the first sentence above, there will still be an issue identified for unusedFunction. Using the method in the second sentence, there will no longer be an issue.
I think the inline suppressions may not be configured correctly when analyzing the project, although it is correct when rechecking files in this case.
In another case, I added "// cppcheck-suppress misra-c2012-2.7" above the line identifying this type of issue. In this case, I cannot suppress the error message in any of the methods noted above.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When analyzing the code in the GUI by either creating a project, opening a project file or clicking "Reanalyze all files", inline suppressions are being ignored. However, if I select all of the selected files, right click and select Recheck, all inline suppressions will disappear from the list of issues.
In my specific case I verified this on a test project by adding // cppcheck-suppress unusedFunction above the definition of a function that is not called from anywhere else in the program. Using the methods listed in the first sentence above, there will still be an issue identified for unusedFunction. Using the method in the second sentence, there will no longer be an issue.
I think the inline suppressions may not be configured correctly when analyzing the project, although it is correct when rechecking files in this case.
In another case, I added "// cppcheck-suppress misra-c2012-2.7" above the line identifying this type of issue. In this case, I cannot suppress the error message in any of the methods noted above.
Stupid question did you enable "Enable inline suppressions" in the preferences?
Sorry. I forgot to mention. I did click Enable inline suppressions in the preferences.