How to add header files for project analysis in Polyspace?

3 views (last 30 days)
When checking Polyspace using a manually created Polyspace project, only C files are scanned. Please provide information on how to include H files in the scan and options.
I included both *.C and *.H in the scan target. (Select Files of Type: All files (*.*) in the Open window) However, only *.C files are identified when checking files to be scanned in the Project browser.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 28 Nov 2022
Edited: MathWorks Support Team on 28 Nov 2022
As you can see from the captured Polyspace example demo project [Help menu > Examples > Bug_Finder_Example.psprj] below, the header files in the folder containing the source C files are automatically included in the scan target. You can directly add header file folders in the purple box below, or you can add header files in Configuration > Environment Settings in the cyan box below.
In the above demo project 'Bug_Finder_Example.psprj', it has the option '
' as default 'source-headers'. It means that results appear on source files and header files in the same folder as the source files or in subfolders of source file folders. In the demo, it also has the option '
' as default 'include-folders'. It means that results are not generated for header files in include folders and their subfolders unless they are in the same folder as the source files. You need to consider these options together when you add include header folders/files.

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!