MATLAB: What options should I select in Polyspace Bug Finder to ensure the code is being checked for the MISRA AC AGC standard

2012acagcautomatic;bugcodeconfigurationfinderflaggenerationmisrapolyspacePolyspace Bug FinderPolyspace Bug Finder Serverstandard

I have included the flags “-misra3 mandatory required” and “-misra3-agc-mode” when running my code through Polyspace Bug Finder. However, under the results pane, I only see a check for “MISRA C:2012” with no mention of MISRA AC AGC. Has my code been sufficiently checked for the rules of the MISRA AC AGC standard?

Best Answer

These options do not guarantee the code has been checked for the MISRA AC AGC standard. These options only check MISRA C:2012 in the context of code generation. Instead, use the flag “-misra-ac-agc”. This flag will specifically check for the MISRA AC AGC standard.
Note that these commands are linked to the options of the “Coding Rules & Code Metrics” section of the Configuration pane. The "-misra3" and "-misra3-agc-mode" commands select the "Check MISRA C:2012” and “Use generated code requirements" options in this pane. The "-misra-ac-agc" command selects the "Check MISRA AC AGC" option. Note that you cannot have both the "Check MISRA C:2012" and "Check MISRA AC AGC" options selected at the same time. Therefore, when adding the "-misra-ac-agc" flag to your test code, you will need to remove the "-misra3 mandatory-required" and "-misra3-agc-mode" flags.