Cppcheck

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Cppcheck
Original author(s) Daniel Marjamäki
Initial release March 10, 2009 (2009-03-10)
Stable release 1.66 / August 2, 2014; 31 days ago (2014-08-02)
Development status Active
Written in C++
Operating system Cross-platform
Available in English, Dutch, Finnish, Swedish, German, Russian, Polish, Japanese, Serbian
Type Static code analysis
License GNU General Public License
Website cppcheck.sourceforge.net

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.[1] The creator and lead developer is Daniel Marjamäki.

Cppcheck is free software under the GNU General Public License.

Plugins[edit]

Plugins for the following IDEs exist[2]

Visual Studio integration[edit]

The commercial third-party Add-In Visual Lint by British company Riverblade can be used to integrate CppCheck in Visual Studio.[10] There is also an open source plugin cppcheck-vs-addin [11] available. It is also possible to add Cppcheck as an external tool.[12]

Features[edit]

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:

As with many analysis programs, there are many unusual cases of programming idioms which may be acceptable in particular target cases, or outside of the programmer's scope for source code correction. A study conducted in March 2009 identified several areas where false positives were found by cppcheck, but did not specify the program version examined.[14] Cppcheck has been identified for use in systems such as CERNs 4DSOFT meta analysis package,[15] for code verification in high energy particle detector readout devices,[16] system monitoring software for radio telescopes[17] as well as in error analysis of large projects, such as OpenOffice.org[18] and the debian archive.[19]

Development[edit]

The project is actively under development[20] and is actively maintained in different distributions.[21][22] It has found valid bugs in a number of popular projects[23] such as the Linux kernel and MPlayer.[24]

See also[edit]

References[edit]

  1. ^ "A Survey of C and C++ Software Tools for Computational Science". Science and Technologies Facility Council. Chilbolton, Daresbury, and Rutherford Appleton Laboratories. December 2009. p. 14. Retrieved 14 September 2010. 
  2. ^ "SourceForge.net: cppcheck". sourceforge.net. 
  3. ^ "Cppcheclipse". googlecode.com. 
  4. ^ "Flycheck". github.com. 
  5. ^ "gedit Cppcheck plugin". github.com. 
  6. ^ "Cppcheck Plugin". hudson-ci.org. 
  7. ^ "Cppcheck Plugin". jenkins-ci.org. 
  8. ^ "Sublimelinter plugin". github.com. 
  9. ^ "Yasca". scovetta.com. 
  10. ^ "Visual Lint homepage". Retrieved 11 December 2012. 
  11. ^ "Homepage cppcheck-vs-addin". Retrieved 3 March 2014. 
  12. ^ "Simple open source static analysis tool for Visual Studio". Retrieved 27 August 2012. 
  13. ^ http://www.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html
  14. ^ "Static Code Analysis For Embedded Systems". 
  15. ^ "Dissemination and use of knowledge plan (EU Deliverable DNA2.11". 2010. 
  16. ^ "Entwurf und Implementierung eines adaptiven, strahlentoleranten eingebetteten Systems am Beispiel eines Read-Out-Controllers (En: Development and implementation of an adaptive, radiation tolerant embedded system for operation of a Read-Out controller)". 2010. 
  17. ^ "The Wettzell System Monitoring Concept and First Realizations". International VLBI Service for Geodesy & Astrometry. 2010. p. 447. 
  18. ^ "Hunting for vulnerabilities in large software : the OpenOffice suite". 
  19. ^ "Introducing the "Debian's Automated Code Analysis" (DACA) project". LWN.net. 
  20. ^ Cppcheck on Github
  21. ^ Cppcheck on Debian's Package Tracking System
  22. ^ FreeBSD port
  23. ^ "List of user reported bugs found by cppcheck". 
  24. ^ "Found Bugs list". SourceForge. 

External links[edit]