- 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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Nideesh Madhu
el 24 de En. de 2022
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 comentarios
Respuesta aceptada
Anirban
el 24 de En. de 2022
Editada: Anirban
el 24 de En. de 2022
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 comentarios
Anirban
el 25 de En. de 2022
Editada: Anirban
el 26 de En. de 2022
Different static analysis tools have different ways to report the issues found. I will not be able to comment on how some specific tool does it. If you contact MathWorks Technical Support, they can help with understanding the differences
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpret Code Prover Results in Polyspace Platform User Interface en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!