Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to add the rule to MISRA 2012 rulemap?

Andrey Madan
Andrey Madan Posts: 388 ✭✭✭

Suppose I created a rule and I want that rule to behave (name and severity wise ) as a MISRA 2012 rule. Where do I add it to MISRA 2012 rulemap?

Comments

  • [Deleted User]
    [Deleted User] Posts: 0

    In the Test Configuration Editor (i.e. in DTP)
    1. Select the 'gears icon' next to the Tool that you are configuring the rulemap for (i.e. in DTP 5.3.3 this is labelled "DTP Engine for C/C++")
    2. Select the Rule Map you are configuring in the pull-down
    3. Select the "Upload/Download" tab
    4. Upload your custom rule using the "Custom Rules" section (NOTE: if this section does not have the "Upload" button, then your user does not have the correct permissions)
    5. (Optionally) edit the rule properties in the "Rule Customization" tab

    See https://docs.parasoft.com/display/DTP533/Rule+Maps for more details

  • Andrey Madan
    Andrey Madan Posts: 388 ✭✭✭
    edited March 2018

    @Mark Lambert . I understand when managing all the MISRA 2012 rules in a centralized location (i.e. DTP). However, what if I duplicate and update MISRA 2012 rule locally via RuleWizard, how do I update the local (desktop) MISRA 2012 rulemap?

  • [Deleted User]
    [Deleted User] Posts: 0

    If you are using the full C/C++test desktop then this section of the docs should help with modifying the local rulemap; https://docs.parasoft.com/display/CPPDESKE1034/Modifying+Rule+Categories%2C+IDs%2C+Names%2C+and+Severity+Levels

    One thing to note, which is probably what you are experiencing ... when you edit a rule that has been remapped (such as one of the MISRA 2012 rules, that are remaps of other rules) then the rule still has the internal ID for the original. So you have two options;
    1) Create the new/updated rule with the MISRA category ID
    2) Update the new/updated rule in the Rule Map