Improved MISRA checking for projects with mixed C/C++ source code
According to chapter 5.7 of the manual, PC-LINT determines the language from the file extension.
Therefore, one could assume that in a mixed C/C++ project one would get MISRA C messages in C modules and MISRA C++ messages in C++ modules respectively.
In reality this is not working, even if you use the –indirect option to help PC-LINT:
common.h/* included in all modules to select MISRA standard based on language*/
Depending on the order of the modules processed, you end up with MISRA C messages in C++ modules and vice versa.
PC-LINT should be able to filter and or enable/disable MISRA messages based on the language determined.
In PC-lint 9, modules were processed one at a time and options appearing in one module would go on to affect the next module. If the first module was a C module, it would activate the options in au-misra3.lnt which would still be in effect when a C++ module was processed.
This issue is resolved in PC-lint Plus where each module is analyzed independently of other modules and options activated within one module will not affect other modules.