Cppcheck
Cppcheck is a static code analysis tool for the C and C++ programming languages. It is a versatile tool that can check non-standard code. The creator and lead developer is Daniel Marjamäki.
Cppcheck is Open-core software, with its open-source core code under the GNU General Public License.
Features
Cppcheck supports a wide variety of static checks that may not be covered by the compiler itself. These checks are static analysis checks that can be performed at a source code level. The program is directed towards static analysis checks that are rigorous, rather than heuristic in nature.Some of the checks that are supported include:
- Automatic variable checking
- Bounds checking for array overruns
- Classes checking
- Usage of deprecated or superseded functions according to Open Group
- Exception safety checking, for example usage of memory allocation and destructor checks
- Memory leaks, e.g. due to lost scope without deallocation
- Resource leaks, e.g. due to forgetting to close a file handle
- Invalid usage of Standard Template Library functions and idioms
- Dead code elimination using unusedFunction option
- Miscellaneous stylistic and performance errors
Development
The project is actively under development and is actively maintained in different distributions. It has found valid bugs in a number of popular projects such as the Linux kernel and MPlayer.Plugins
Plugins for the following IDEs or text editors exist- CLion
- Code::Blocks - integrated.
- CodeLite - integrated.
- Eclipse
- Emacs
- gedit
- Hudson
- Jenkins
- Kate
- KDevelop
- Qt Creator
- Sublime Text
- Visual Studio
- Yasca