2007-07-26 08:16:29 +02:00
|
|
|
|
|
|
|
|
2007-05-09 08:51:44 +02:00
|
|
|
=========
|
2008-12-19 20:19:26 +01:00
|
|
|
Cppcheck
|
2007-05-09 08:51:44 +02:00
|
|
|
=========
|
|
|
|
|
|
|
|
|
2008-12-19 20:19:26 +01:00
|
|
|
About
|
|
|
|
|
|
|
|
The original name of this program is "C++check".
|
|
|
|
The name was changed to "cppcheck" (a google search is more successful now).
|
|
|
|
|
2007-07-26 08:16:29 +02:00
|
|
|
|
2007-05-09 08:51:44 +02:00
|
|
|
Compiling
|
|
|
|
|
2008-12-19 20:19:26 +01:00
|
|
|
Any C++ compiler should work.
|
2007-05-09 08:51:44 +02:00
|
|
|
|
2007-07-26 08:16:29 +02:00
|
|
|
The Makefile works under Linux.
|
2008-12-11 19:07:23 +01:00
|
|
|
To make it work under Windows with DJGPP, change "g++" to "gxx".
|
2007-05-09 08:51:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
|
2007-05-23 09:49:44 +02:00
|
|
|
The syntax is:
|
2008-12-27 08:52:07 +01:00
|
|
|
cppcheck [--all] [--quiet] [--style] [--verbose] [--force] [file or path] [file or path]
|
2007-05-09 08:51:44 +02:00
|
|
|
|
|
|
|
The error messages will be printed to stderr.
|
|
|
|
|
2008-02-22 15:58:53 +01:00
|
|
|
Example (Check all files. Use all checks):
|
2008-12-19 20:19:26 +01:00
|
|
|
cppcheck --style --all ./
|
|
|
|
|
|
|
|
To output error messages to a file use this syntax (works both on Windows and Linux):
|
|
|
|
cppcheck file.cpp 2> err.txt
|
|
|
|
|
2007-05-09 08:51:44 +02:00
|
|
|
|
|
|
|
Recommendations
|
|
|
|
|
2007-07-26 08:16:29 +02:00
|
|
|
When the "--all" flag is given you may get a lot of error messages.
|
|
|
|
|
2008-12-19 20:19:26 +01:00
|
|
|
|
|
|
|
Webpage
|
|
|
|
|
|
|
|
http://www.sf.net/projects/cppcheck
|
|
|
|
|
|
|
|
|