Menu

Inline suppressions not function properly in GUI

2020-01-10
2020-01-10
  • Jonathon Smith

    Jonathon Smith - 2020-01-10

    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.

     
  • Daniel Marjamäki

    Stupid question did you enable "Enable inline suppressions" in the preferences?

     
  • Jonathon Smith

    Jonathon Smith - 2020-01-10

    Sorry. I forgot to mention. I did click Enable inline suppressions in the preferences.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.