static analysis of C/C++ code
Go to file
Daniel Marjamäki b0d1e83c88 TestPreprocessor: Minor update to ensure that extra spaces are filtered out 2008-11-03 07:56:23 +00:00
man man: Added xml for generating man page 2008-11-01 17:16:48 +00:00
COPYING Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckBufferOverrun.cpp Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckBufferOverrun.h Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckClass.cpp Class Checking: Fixed AV in FindClassFunction 2008-11-02 12:48:45 +00:00
CheckClass.h Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckHeaders.cpp Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckHeaders.h Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckMemoryLeak.cpp Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckMemoryLeak.h Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckOther.cpp TestCharVar: Fixed some false positives 2008-11-02 16:29:36 +00:00
CheckOther.h Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CommonCheck.cpp Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CommonCheck.h Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
Makefile Makefile: Applied changes suggested by Reijo 2008-11-01 17:12:05 +00:00
cppcheck.cbproj cg2007: Added CodeGear 2007 project files 2008-08-07 19:15:06 +00:00
main.cpp Preprocessor: Added elif handling. Check for invalid characters 2008-10-31 18:52:47 +00:00
preprocessor.cpp preprocessor: handling the '\' in preprocessor code 2008-11-02 17:04:46 +00:00
preprocessor.h Preprocessor: Added elif handling. Check for invalid characters 2008-10-31 18:52:47 +00:00
readme.txt updated command syntax example 2008-02-22 14:58:53 +00:00
testbufferoverrun.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
testcharvar.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
testconstructors.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
testdivision.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
testmemleak.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
testother.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
testpreprocessor.cpp TestPreprocessor: Minor update to ensure that extra spaces are filtered out 2008-11-03 07:56:23 +00:00
testrunner.cbproj C++ Builder: Added the preprocessor files to testrunner.cbproj 2008-10-27 07:46:45 +00:00
testrunner.cpp Testing: Only run tests in a specified class 2008-10-26 11:11:26 +00:00
tests.cpp test: Added 'testdivision' 2008-08-23 16:40:53 +00:00
testsuite.cpp Testing: Only run tests in a specified class 2008-10-26 11:11:26 +00:00
testsuite.h Testing: Only run tests in a specified class 2008-10-26 11:11:26 +00:00
testtokenize.cpp Tokenizer: Handle '\' in preprocessor lines 2008-11-03 07:53:30 +00:00
testunusedvar.cpp Testing: DeallocateTokens after each test 2008-11-03 07:54:59 +00:00
todo.txt todo: added todo to simplify the token list further 2008-08-09 08:35:28 +00:00
tokenize.cpp Tokenizer: Handle '\' in preprocessor lines 2008-11-03 07:53:30 +00:00
tokenize.h preprocessor: Use the new preprocessor in cppcheck 2008-10-30 19:42:34 +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)