- The option, see Generate results for sources and (-generate-results-for).
- Other possible causes, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Polyspace codeprover doesnt give a warning for MISRA violation(MISRA C:2012, 19.2 - The union keyword should not be used)
5 次查看(过去 30 天)
显示 更早的评论
We are enabling MISRA C:2012-all in polyspace code prover. We have unions declared in header files and created objects for that in source file. But when we ran the code prover we didnt see any warning for union(violation of MISRA C:2012, 19.2). What could be the possible reason? We know that some of the rules are not supported by code prover but this rule is not part of that.
0 个评论
采纳的回答
Anirban
2022-1-24
编辑:Anirban
2022-1-24
There could be many reasons related to the coding rules checking setup, but one possible reason is that your headers are in a completely separate location from your sources. By default, the coding rules checking flags violations only in sources and headers in source folders and subfolders. The reason is that, headers in other folders are typically third-party headers (like compiler headers and so on) and are outside the user's control. Even if a violation occurs, there is not much the user can do about it.
To see results in all headers, use the option -generate-results-for all-headers . If that was the problem, the coding rule violation should appear now.
For information on:
Note: It is recommended to use Polyspace Bug Finder for all coding rules checking. Polyspace Bug Finder has full coverage for MISRA C:2012. In fact, support for coding rules checking will be removed from Polyspace Code Prover in the future. See Polyspace Code Prover release notes. For help with transitioning, see Migrate Code Prover Workflows for Coding Standards Checking and Code Metrics to Bug Finder. (But the default analysis scope of Bug Finder is same as Code Prover when it comes to coding rules checking. So, you will still have to use the option -generate-results-for all-headers if you want results in all headers.)
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpret Code Prover Results in Polyspace Platform User Interface 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!