Search code examples
static-code-analysiscppcheck

How to use CppCheck tool to review your c / cpp code in ubuntu?


I am trying to use the CppCheck tool in Ubuntu. I ran the following command

cppcheck --enable=all  --check-config --suppress=missingIncludeSystem main.c 2>err.txt

It is creating the err.txt file but it is empty.

How to get the ratings or check the code in the main.c file.


Solution

  • remove --check-config .. that tells cppcheck that you only want to check the command line configuration.