static analysis of C/C++ code
Go to file
Daniel Marjamäki 92b5af4abc Cleanup old testing 2008-02-17 11:58:37 +00:00
internaltesting Tokenize: Simplify declarations 2007-05-29 06:24:36 +00:00
CheckBufferOverrun.cpp Command line options: Added "--all" and "--style", removed "-w" 2007-07-20 15:43:39 +00:00
CheckBufferOverrun.h CheckBufferOverrun: Added 'CheckDangerousFunctions' 2007-05-25 06:44:53 +00:00
CheckClass.cpp Better checking of uninitialized variables 2008-01-17 07:46:10 +00:00
CheckClass.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
CheckHeaders.cpp Minor updates to make it portable to Linux. 2007-07-17 06:15:50 +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 Unit Testing: Moved 'testmemcheck' 2008-02-16 18:24:13 +00:00
CheckMemoryLeak.h CheckMemoryLeak: Added files (Check for memory leaks) 2007-05-24 13:08:51 +00:00
CheckOther.cpp Removing false positives 2007-08-31 04:23:09 +00:00
CheckOther.h Added checks: 2007-07-24 06:23:28 +00:00
CommonCheck.cpp Unit Testing: Start 2008-02-16 15:46:32 +00:00
CommonCheck.h Unit Testing: Start 2008-02-16 15:46:32 +00:00
Makefile Unit Testing: Start 2008-02-16 15:46:32 +00:00
Statements.cpp Added 2 checks for memory leaks 2007-07-27 08:11:07 +00:00
Statements.h CheckClass; Added files (Check for mistakes related to classes) 2007-05-24 13:07:30 +00:00
TestTok.cpp minor updates 2007-05-29 17:12:14 +00:00
bufferoverrun.txt bufferoverrun.txt: Added file that contains thoughts and ideas concerning buffer overruns. 2007-07-20 06:21:40 +00:00
checknpp.bat check npp472 instead of npp41 2008-01-11 07:30:56 +00:00
checkproj.bat Minor update: Updated the readme and checkproj files. 2007-07-26 06:16:29 +00:00
main.cpp Unit Testing: Moved 'testmemcheck' 2008-02-16 18:24:13 +00:00
readme.txt Minor update: Updated the readme and checkproj files. 2007-07-26 06:16:29 +00:00
tests.cpp Unit Testing: Moving memleak checks 2008-02-17 11:45:06 +00:00
tokenize.cpp Unit Testing: Start 2008-02-16 15:46:32 +00:00
tokenize.h Unit Testing: Start 2008-02-16 15:46:32 +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] filename.cpp

  The error messages will be printed to stderr.




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)