static analysis of C/C++ code
Go to file
Daniel Marjamäki ea57f2b820 Memory leaks : Handle assignments better - bug 2395524 2008-12-07 07:32:02 +00:00
man Verbose: Added line change to help text printing and updated man page 2008-11-30 10:38:58 +00:00
COPYING Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckBufferOverrun.cpp Token: Fixed bug in match function, simplified CheckBufferOverrun code 2008-12-05 20:37:05 +00:00
CheckBufferOverrun.h Array index : No recursive checking unless the "--all" has been given 2008-11-27 20:29:29 +00:00
CheckClass.cpp Check constructors: Minor optimisation 2008-12-07 07:02:00 +00:00
CheckClass.h Class checking : Check that base class destructors are virtual. Experimental 2008-12-06 17:34:34 +00:00
CheckFunctionUsage.cpp TODO: added a todo to add an error message. and removed an "invalid" todo 2008-11-25 18:15:32 +00:00
CheckFunctionUsage.h Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
CheckHeaders.cpp CheckHeaders: Refactoring so str and Match is used instead of aaaa and 2008-12-05 18:46:05 +00:00
CheckHeaders.h increased constness of member variable _tokenizer in the Check* classes 2008-11-22 20:00:36 +00:00
CheckMemoryLeak.cpp Memory leaks : Handle assignments better - bug 2395524 2008-12-07 07:32:02 +00:00
CheckMemoryLeak.h Memory leaks: Better handling of "realloc". Fixing bug [ 2395262 ] 2008-12-06 13:33:22 +00:00
CheckOther.cpp Unreachable code : minor bug fixes 2008-12-06 16:54:45 +00:00
CheckOther.h Added check that detects unreachable code below a 'return' statement 2008-12-06 16:25:24 +00:00
FileLister.cpp Fix bug when calling cppcheck without --recursive flag 2008-12-07 00:56:24 +00:00
FileLister.h Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
Makefile testclass : Added a new unit testing file 2008-12-06 18:31:26 +00:00
cppcheck.cbp Refactoring: Updated project file for Code::Blocks 2008-11-24 21:51:02 +00:00
cppcheck.cbproj updated the borland project file 2008-12-02 14:38:32 +00:00
cppcheck.cpp Class checking : Check that base class destructors are virtual. Experimental 2008-12-06 17:34:34 +00:00
cppcheck.h cppcheck and executor, fixed compiling error 2008-12-06 09:27:28 +00:00
cppcheck.sln Added Visual C++ 2008 Express solution and project files 2008-11-03 18:57:18 +00:00
cppcheck.vcproj Visual C++: Updated the project file 2008-11-24 07:47:13 +00:00
cppcheckexecutor.cpp cppcheck and executor, fixed compiling error 2008-12-06 09:27:28 +00:00
cppcheckexecutor.h cppcheck and executor, fixed compiling error 2008-12-06 09:27:28 +00:00
errorlogger.h Refactoring: Added missing license texts and some comments 2008-11-24 22:10:48 +00:00
main.cpp Refactoring: CppCheckExecutor class added 2008-11-24 21:50:20 +00:00
preprocessor.cpp Preprocessor: Fixed bug, read() didn't handle correctly string constants like this: "\"" 2008-12-05 22:18:13 +00:00
preprocessor.h Preprocessor: Minor refactoring and improved testing 2008-12-04 07:34:31 +00:00
readme.txt updated command syntax example 2008-02-22 14:58:53 +00:00
settings.cpp Verbose error message output through '--verbose' 2008-11-30 09:08:07 +00:00
settings.h Verbose error message output through '--verbose' 2008-11-30 09:08:07 +00:00
testbufferoverrun.cpp Array index : No recursive checking unless the "--all" has been given 2008-11-27 20:29:29 +00:00
testcharvar.cpp Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +00:00
testclass.cpp Virtual destructors : Handle inheritance where 2008-12-07 06:31:54 +00:00
testconstructors.cpp Constructors : Fixed so the test that kush_eplus added works 2008-12-07 06:58:23 +00:00
testdivision.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
testfunctionusage.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
testincompletestatement.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
testmemleak.cpp Memory leaks : Handle assignments better - bug 2395524 2008-12-07 07:32:02 +00:00
testpreprocessor.cpp Preprocessor: Minor refactoring and improved testing 2008-12-04 07:34:31 +00:00
testrunner.cbproj Borland C++: Added files "cppcheck" and "settings" to the projects 2008-11-15 07:01:07 +00:00
testrunner.cpp Refactoring: Errors are no longer logged via global functions to a global stream. Instead callback function is used via interface. 2008-11-20 22:19:26 +00:00
testrunner.sln Visual C++ Express 2008: Added project 'testrunner' and updated the project 'cppcheck' 2008-11-15 07:15:01 +00:00
testrunner.vcproj Visual C++ Express 2008: Added project 'testrunner' and updated the project 'cppcheck' 2008-11-15 07:15:01 +00:00
testsimplifytokens.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
testsuite.cpp testsuite: show diffing strings better when they are not equal 2008-12-04 19:31:30 +00:00
testsuite.h testing: minor refactoring so better error messages are shown 2008-12-01 18:52:03 +00:00
testtokenize.cpp Fixed so that the expected and actual values in asserts are not mixed 2008-12-06 12:57:06 +00:00
testunusedprivfunc.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
testunusedvar.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
todo.txt todo: added memory leak examples 2008-11-10 18:52:15 +00:00
token.cpp TODO: Added a todo for refactoring TOKEN::Match 2008-12-06 13:21:33 +00:00
token.h TOKEN: Match() function improved, %any% and const|volatile kind of patterns are now accepted. Simplified comparing on tokenize.cpp. 2008-12-04 21:48:15 +00:00
tokenize.cpp tokenize: "~Base" should generate two tokens. "~" and "Base" 2008-12-06 17:53:30 +00:00
tokenize.h Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +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)