Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i run a saved project from command line in CppCheck

I created a project in CppCheck named CppCheck_MainRls.cppcheck that includes several directories, i can run the project from the gui and it's working. my project is huge so i only need a few directories to pass through CppCheck and export the result into xml file (later to be read by jenkins)

The current command line is:

"C:\Program Files (x86)\Cppcheck\CppCheck.exe" --enable=all  --xml-version=2 "C:\Program Files (x86)\Jenkins\jobs\MainRls\workspace\Labs\VC++\AllShared" 2> cppcheck_result.xml

which is working great for the "AllShared" directory, how can i change it to read my project file?

like image 758
Mike Tishler Avatar asked Jan 08 '14 07:01

Mike Tishler


People also ask

Which command can be used to do static analysis using Cppcheck with all check enabled for all files in the current folder?

Example: -DDEBUG=1 -D__cplusplus -U<id> By default Cppcheck checks all configurations. Use '-U' to explicitly hide certain #ifdef <id> code paths from checking. Example: '-UDEBUG' --enable=<id> Enable additional checks. The available ids are: all Enable all checks.

How do I turn off Cppcheck warning?

put "//cppcheck-suppress <id>" in a new line before the line in which error to be suppressed occurrs.


1 Answers

I am a cppcheck developer. Currently, you can't use a gui project file directly in the shell client. However it is a good idea to allow it.

like image 50
Daniel Marjamäki Avatar answered Nov 13 '22 06:11

Daniel Marjamäki