static analysis of C/C++ code
Go to file
Daniel Marjamäki 6fcbbf21ee Memory leaks: Reverted the sensitive checking in r536. And improved the
simplifycode function.
2008-11-27 07:27:50 +00:00
man Applied patch "errors_only_man" that adds description for "--errorsonly" to the man page. This was submitted by kimmov in bug 2277848 2008-11-15 06:44:32 +00:00
COPYING Licensing: Using the GPL 3 license 2008-10-26 07:55:15 +00:00
CheckBufferOverrun.cpp TOKEN: Refactoring the 'str' member variable 2008-11-24 19:38:08 +00:00
CheckBufferOverrun.h Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
CheckClass.cpp TOKEN: Refactoring the 'str' member variable 2008-11-24 19:38:08 +00:00
CheckClass.h increased constness of member variable _tokenizer in the Check* classes 2008-11-22 20:00:36 +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 TOKEN: Refactoring the 'str' member variable 2008-11-24 19:38:08 +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: Reverted the sensitive checking in r536. And improved the 2008-11-27 07:27:50 +00:00
CheckMemoryLeak.h CheckMemoryLeak: Refactoring. Use TOKEN::isStandardType instead of rewriting its functionality 2008-11-26 07:23:54 +00:00
CheckOther.cpp TOKEN: Refactoring the 'str' member variable 2008-11-24 19:38:08 +00:00
CheckOther.h increased constness of member variable _tokenizer in the Check* classes 2008-11-22 20:00:36 +00:00
FileLister.cpp Visual C++: Updated the FileLister (applied patch FileLister_ReworkRecursiveAddFiles submitted by kush_eplus) 2008-11-24 14:01:33 +00:00
FileLister.h Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
Makefile Refactoring: CppCheckExecutor class added 2008-11-24 21:50:20 +00:00
cppcheck.cbp Refactoring: Updated project file for Code::Blocks 2008-11-24 21:51:02 +00:00
cppcheck.cbproj Borland C++: Minor updates so cppcheck compiles with Borland C++ 2008-11-24 07:35:03 +00:00
cppcheck.cpp Feature added: CppCheck class has now function addFile(string,string) which allows checking of unreal files, by giving just filename and file content as a 2008-11-25 20:56:11 +00:00
cppcheck.h Feature added: CppCheck class has now function addFile(string,string) which allows checking of unreal files, by giving just filename and file content as a 2008-11-25 20:56:11 +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 Refactoring: Added missing license texts and some comments 2008-11-24 22:10:48 +00:00
cppcheckexecutor.h Refactoring: Added missing license texts and some comments 2008-11-24 22:10:48 +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 Refactoring: CommonCheck.* files are removed. Rest of the global functions from there were moved to Tokenizer class 2008-11-21 21:14:24 +00:00
preprocessor.h 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
readme.txt updated command syntax example 2008-02-22 14:58:53 +00:00
settings.cpp Refactoring: Started making CppCheck class more generally usable (e.g. as a part of IDE). 2008-11-23 22:01:09 +00:00
settings.h Refactoring: Started making CppCheck class more generally usable (e.g. as a part of IDE). 2008-11-23 22:01:09 +00:00
testbufferoverrun.cpp Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +00:00
testcharvar.cpp Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +00:00
testconstructors.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +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: Reverted the sensitive checking in r536. And improved the 2008-11-27 07:27:50 +00:00
testpreprocessor.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.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 Refactoring: CppCheckExecutor class added 2008-11-24 21:50:20 +00:00
testsuite.h Refactoring: CppCheckExecutor class added 2008-11-24 21:50:20 +00:00
testtokenize.cpp Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +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 token: refactoring the 'isStandardType' a little 2008-11-26 07:22:34 +00:00
token.h token: refactoring the 'isStandardType' a little 2008-11-26 07:22:34 +00:00
tokenize.cpp Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +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)