How to run Polyspace Bugfinder CLI with C++ header files (.hpp)?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello Mathworks Support Team,
I'm a user of Polyspace Bugfinder. Normally, when I run Polyspace Bugfinder in command line with specific source files, I will do with the steps below:
polyspace-configure -allow-overwrite -compilation-database xxx.json
-output-options-file options.txt -include-sources xxx.cpp
And then:
polyspace-bug-finder -autosar-cpp14 all -options-file .../options.txt -do-not-generate-results-for all-headers
-results-dir .../polyspace-bug-finder
These command runs fine with .cpp files, but they can not run with .hpp files.
Can you instruct me the way to run Polyspace Bugfinder with header files (.hpp)
댓글 수: 0
답변 (1개)
Anirban
2022년 6월 7일
Just trying to understand your use-case better.
Do you want to run Bug Finder on some header files by themselves, or do you want to run Bug Finder on headers included in sources? I am asking this because you have -do-not-generate-results-for all-headers, which explicitly asks not to show results on all headers. If you did want results on a subset of those headers, you can use -generate-results-for with paths to folders containing those headers.
댓글 수: 3
Anirban
2022년 6월 9일
편집: Anirban
2022년 6월 9일
You can write a simple source that #include-s the header and analyze the source (in this particular analysis, make sure to say -generate-results-for all-headers). The creation of this file can be done using scripts.
If your header file compiles on its own and the compilation information is there in your compilation database (xxx.json), your current commands should also work in principle (provided you remove the -do-not-generate-results-for all-headers).
참고 항목
카테고리
Help Center 및 File Exchange에서 Bug Finder Analysis with MATLAB Scripts에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!