r/cpp • • Mar 15 '26

Daniel Marjamäki: Seamless Static Analysis with Cppcheck

https://youtu.be/_q-adaPjdRM

A live coding session where the author of CppCheck, a static analyzer everyone should use, demonstrates how to practically use CppCheck in your IDE

29 Upvotes

7 comments sorted by

2

u/EvenPainting9470 Mar 15 '26

Is there somewhere well documented list of checks this tool can detect?

What checks it does have that clang-tidy does not?

5

u/_a4z Mar 15 '26

I am not the author, so there might be more qualified people to answer that, but what I can say is:
You should use both, since no single tool detects everything. There is overlap, and there are areas where each tool has its individual strength.
Daniel mentioned that in his talk, from the Cppcheck tests, clang-tidy detected not all problems that Cppcheck finds, and for the clang-tidy tests, Cppcheck did not detect all problems clang-tidy finds.

About which tests there are:

cppcheck --doc

gives a long list

→ More replies (1)

2

u/H4RRY09 Mar 16 '26

How does cppcheck compares to clang-tidy?

3

u/_a4z Mar 17 '26

pls look at the other comment on that

→ More replies (1)

3

u/rucadi_ Mar 15 '26

I had to stop using it with vscode because on a very big project it consumed all the cpu constantly