Search code examples
static-analysiscppcheck

How to use Cppcheck to review C/C++ code in Ubuntu?


I am trying to use Cppcheck tool on 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 check results of main.c?


Solution

  • Remove --check-config. That option tells Cppcheck that you only want to check the command line configuration.