Menu

CPPCheck Premium: Addons Not Available in GUI

Alan Cohen
2023-08-28
2023-09-09
  • Alan  Cohen

    Alan Cohen - 2023-08-28

    I've installed CPPCheck Premium and would like to run an analysis from the GUI that includes checking against MISRA C. I think I need to enable that in the addons tab under preferences? That tab is not displaying any addons. A few things...

    • The python binary path is blank, but python is in the path (I confirmed by running it in a command shell).
    • The program directory does have an addon directory, and there are a number of python scripts within it
     
  • Daniel Marjamäki

    I think I need to enable that in the addons tab under preferences?

    Almost. Create a project (File,New Project). In the project dialog that is shown, enable misra in its addons tab.

    The python binary path is blank, but python is in the path

    That sounds normal. You only need to write a path if you want to override it.

     
    • Alan  Cohen

      Alan Cohen - 2023-08-29

      I actually did that when I opened the original project. However, I didn't see MISRA violations called out as such in the GUI after analysis. So I assumed MISRA checking was turned off.

      I just opened a saved XML file in a text editor, and it does look like the MISRA violations are marked as MISRA violations in the XML file. So, I guess my follow up questions are:

      • Is reading "error id" in the XML file the only or best way to determine which issues are MISRA violations?
      • Why doesn't the MISRA addon show up in the Addons tab?

      One additional question (which I'm sure is a dumb one): what is the purpose of "Since Date"?

       
  • Daniel Marjamäki

    • I suggest that you show the error id in the GUI. Edit, Preferences. Then click on the "display error id in column "Id" checkbox.
    • Because maybe in one project you check MISRA and then in another project you don't. The preferences are for global options that apply to all your projects.
     
  • Daniel Marjamäki

    The idea of the "Since Date" is to show when a warning was first detected by Cppcheck. Well that feature does not work that well I am afraid maybe it's better to remove it.

     
  • Alan  Cohen

    Alan Cohen - 2023-09-01

    That's all helpful, thanks.

    One more thing... when I go to File/Open Project File, it displays the attached screen under addons, which seems to indicate that MISRA checking is not available? But the MISRA results do end up being generated.

     
    • Daniel Marjamäki

      One more thing... when I go to File/Open Project File, it displays the attached screen under addons, which seems to indicate that MISRA checking is not available? But the MISRA results do end up being generated.

      Can you please check that you find the misra.py addon in the installation folder.

      I cannot explain immediately why you get MISRA results but there are warnings generated by the premiumaddon maybe it's those that you see. But still .. if you can't check that checkbox then I am confused why it writes misra results.

       
  • Alan  Cohen

    Alan Cohen - 2023-09-01

    misra.py is in a subdirectory of the installation directory; attached is a screenshot of the directories/addons I'm seeing.

    The weird thing is that I remember selecting MISRA checking, I think when I created my first project. Now it seems that something has changed.

     
  • Andrew C Aitchison

    Screenshot 2023-09-01 103640.png indicates that you have the MISRA C++ 2008 addon,
    but not the MISRA C 2012 addon. Is that what you have ?

    Are they two different .py files ?

     
    • Daniel Marjamäki

      Are they two different .py files ?

      Well misra.py provides MISRA C. It's identical to the misra.py provided in open source cppcheck. premiumaddon.exe provides various premium features for instance MISRA C++. premiumaddon.exe is not in the addon folder so it's not seen in the screenshot above.

       
      • Alan  Cohen

        Alan Cohen - 2023-09-08

        Since I have premium, should premiumaddon.exe be in the addon folder?

         
        • Daniel Marjamäki

          no

           
  • Alan  Cohen

    Alan Cohen - 2023-09-01

    I thought I was supposed to get MISRA C with Premium?

     
  • Daniel Marjamäki

    Your screenshot looks correct. hmm.. strange that the gui says "not found"?!

    misra.py is the MISRA C addon.

    MISRA C++ 2008 is provided in the premium addon. premiumaddon.exe

     

    Last edit: Daniel Marjamäki 2023-09-01

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.