static analysis of C/C++ code
Go to file
Daniel Marjamäki bee1c1fb8d Refactoring CheckMemoryLeak to detect more leaks 2008-04-08 07:03:32 +00:00
CheckBufferOverrun.cpp CheckBufferOverrun: Removed a false positive 2008-04-06 11:53:23 +00:00
CheckBufferOverrun.h CheckBufferOverrun: Added 'CheckDangerousFunctions' 2007-05-25 06:44:53 +00:00
CheckClass.cpp Match: Added matching for [] 2008-04-02 09:37:05 +00:00
CheckClass.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
CheckHeaders.cpp Fixing bug 1935006 - Compile problems on cygwin 2008-04-06 06:26:11 +00:00
CheckHeaders.h CheckHeaders: Added files (Check for mistakes in headers or related to headers) 2007-05-24 13:08:18 +00:00
CheckMemoryLeak.cpp Refactoring CheckMemoryLeak to detect more leaks 2008-04-08 07:03:32 +00:00
CheckMemoryLeak.h CheckMemoryLeak: Added files (Check for memory leaks) 2007-05-24 13:08:51 +00:00
CheckOther.cpp Minor updates. Removed some false positives when checking variable scope 2008-04-01 06:21:12 +00:00
CheckOther.h Added test 'CheckVariableScope'. Increased constness. 2008-03-16 13:17:43 +00:00
CommonCheck.cpp Fixing bug 1935006 - Compile problems on cygwin 2008-04-06 06:26:11 +00:00
CommonCheck.h Fixing bug 1935006 - Compile problems on cygwin 2008-04-06 06:26:11 +00:00
Makefile Makefile: Removed Statements 2008-04-06 09:47:25 +00:00
bugs_that_cppcheck_finds.txt Minor updates in text files. 2008-04-06 11:39:49 +00:00
main.cpp Minor updates to [232] and [233]. Use __GNUC__ define instead of CYGWIN 2008-04-06 06:45:30 +00:00
readme.txt updated command syntax example 2008-02-22 14:58:53 +00:00
tests.cpp Refactoring CheckMemoryLeak to detect more leaks 2008-04-08 07:03:32 +00:00
todo.txt Minor updates in text files. 2008-04-06 11:39:49 +00:00
tokenize.cpp Fixing bug 1935006 - Compile problems on cygwin 2008-04-06 06:26:11 +00:00
tokenize.h Refactoring: Replaced deprecated "match" with the new "Match" 2008-03-28 07:18:03 +00:00

readme.txt


=========
C++ check
=========



Compiling

  Any C++ compiler should work. 
  There are no dependencies.

  The Makefile works under Linux.
  To make it work under Windows, change "g++" to "gxx".

  I haven't been able to test it on other platforms.



Usage

  The syntax is:
      cppcheck [--all] [--style] [--recursive] [filename1] [filename2]

  The error messages will be printed to stderr.

  Example (Check all files. Use all checks):
      cppcheck -style --all --recursive


Recommendations

  Create a shell script that checks all files.
  See "checkproj.bat" for an example of how it can be done under Windows.

  When the "--all" flag is given you may get a lot of error messages.

  To dump the messages to a textfile you can use a command like this:
      cppcheck --all filename.cpp 2> messages.txt

  If you want to filter the messages you could use:
    * grep to filter out specific types of messages
    * diff to compare old messages with new messages. There are even GUIs for
      this.



Suggestions

  I'd like to get suggestions about new checks.



Author

  Daniel Marjamäki   (danielm77@spray.se)