Cppcheck

维基百科,自由的百科全书
Cppcheck
原作者Daniel Marjamäki
首次发布2007年5月8日,​16年前​(2007-05-08
当前版本
  • 2.14.0 (2024年4月20日;穩定版本)[1]
編輯維基數據鏈接
源代码库 編輯維基數據鏈接
编程语言C++
操作系统Cross-platform
语言English, Dutch, Finnish, Swedish, German, Russian, Japanese, Serbian, Spanish, French, Italian, Korean, Chinese
类型Static code analysis
许可协议GNU General Public License
网站cppcheck.sourceforge.net

Cppcheck是一种用于CC ++ 编程语言静态代码分析工具。 它是一个多功能工具,可以检查非标准代码。 [2] 创始人和首席开发人员是DanielMarjamäki。

Cppcheck是GNU通用公共许可证下的免费软件

特征

Cppcheck支持编译器本身可能无法涵盖的各种静态检查。 这些检查是可以在源代码级别执行静态分析检查。 该程序面向严格的静态分析检查,而不是启发式检查。

支持的一些检查包括:

  • 自动变量检查
  • 检查阵列溢出的边界
  • 检查(例如,未使用的函数,变量初始化和内存复制)
  • 根据Open Group [3]使用已弃用或已取代的函数
  • 异常安全检查,例如内存分配和析构函数检查的使用
  • 内存泄漏 ,例如由于丢失范围而没有重新分配
  • 资源泄漏 ,例如由于忘记关闭文件句柄
  • 标准模板库函数和习语的使用无效
  • 杂项风格和性能错误

与许多分析程序一样,有许多不寻常的编程习惯用例在特定目标情况下可以接受,或者在程序员的源代码校正范围之外。 2009年3月进行的一项研究确定了Cppcheck发现误报的几个区域,但未指明所检查的程序版本。 [4] Cppcheck已被确定用于诸如CERNs 4DSOFT元分析软件包, [5]也用于高能粒子探测器读出设备中的代码验证, [6]也用于射电望远镜的系统监测软件[7]以及大型误差分析等系统中。项目,如OpenOffice.org [8]Debian档案。 [9]

发展

该项目正在积极开发[10]并在不同的发行版中积极维护。 [11] [12] 它在许多流行的项目[13]找到了有效的错误,例如Linux内核MPlayer[14]

插件

存在以下IDE的插件[15]

  • 静态代码分析工具列表


参考

  1. ^ Release 2.14.0. 2024年4月20日 [2024年4月20日]. 
  2. ^ A Survey of C and C++ Software Tools for Computational Science (PDF). Science and Technologies Facility Council. Chilbolton, Daresbury, and Rutherford Appleton Laboratories. December 2009 [14 September 2010]. (原始内容 (PDF)存档于2012-03-12). 
  3. ^ 存档副本. [2019-08-10]. (原始内容存档于2009-04-27). 
  4. ^ Static Code Analysis For Embedded Systems (PDF). [2019-08-10]. (原始内容存档 (PDF)于2017-09-27). 
  5. ^ Dissemination and use of knowledge plan (EU Deliverable DNA2.11 (PDF). 2010 [2019-08-10]. (原始内容存档 (PDF)于2013-06-04). 
  6. ^ 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) (PDF). 2010 [2019-08-10]. (原始内容 (PDF)存档于2012-03-11). 
  7. ^ The Wettzell System Monitoring Concept and First Realizations (PDF). International VLBI Service for Geodesy & Astrometry. 2010 [2019-08-10]. (原始内容存档 (PDF)于2017-01-31). 
  8. ^ Hunting for vulnerabilities in large software : the OpenOffice suite (PDF). [2019-08-10]. (原始内容存档 (PDF)于2012-09-28). 
  9. ^ Introducing the "Debian's Automated Code Analysis" (DACA) project. LWN.net. [2019-08-10]. (原始内容存档于2018-10-01). 
  10. ^ Cppcheck on Github. [2019-08-10]. (原始内容存档于2019-09-21). 
  11. ^ Cppcheck on Debian's Package Tracking System. [2019-08-10]. (原始内容存档于2018-10-14). 
  12. ^ FreeBSD port. [2019-08-10]. (原始内容存档于2019-09-24). 
  13. ^ List of user reported bugs found by cppcheck. [2019-08-10]. (原始内容存档于2018-10-14). 
  14. ^ Found Bugs list. SourceForge. [2019-08-10]. (原始内容存档于2013-10-14). 
  15. ^ SourceForge.net: cppcheck. sourceforge.net. [2019-08-10]. (原始内容存档于2012-07-18). 
  16. ^ cppcheck plugin for CLion. plugins.jetbrains.com. [2019-08-10]. (原始内容存档于2016-08-04). 
  17. ^ Cppcheclipse. github.com. [2019-08-10]. (原始内容存档于2018-06-11). 
  18. ^ Flycheck. github.com. [2019-08-10]. (原始内容存档于2019-09-24). 
  19. ^ gedit Cppcheck plugin. github.com. [2019-08-10]. (原始内容存档于2012-12-17). 
  20. ^ Cppcheck Plugin. hudson-ci.org. [2019-08-10]. (原始内容存档于2017-10-26). 
  21. ^ Cppcheck Plugin. jenkins-ci.org. [2019-08-10]. (原始内容存档于2016-11-24). 
  22. ^ Cullmann, Christoph. Kate Project Plugin News – Code Analysis. Kate | Get an Edge in Editing. 2013-02-02 [2016-12-14]. (原始内容存档于2016-12-20). 
  23. ^ Funk, Kevin. KDevelop's Cppcheck plugin merged into kdevelop.git, will be released with 5.1. 2016-12-06 [2016-12-14]. (原始内容存档于2016-12-20). 
  24. ^ Qt Creator Plug-in Gallery. Qt Wiki. [2019-08-10]. (原始内容存档于2018-10-12). 
  25. ^ Sublimelinter plugin. github.com. [2019-08-10]. (原始内容存档于2019-08-09). 
  26. ^ Cppcheck add-in. Visual Studio Marketplace. [2019-08-10]. (原始内容存档于2020-03-27). 
  27. ^ VioletGiraffe. Homepage cppcheck-vs-addin. [3 March 2014]. (原始内容存档于2020-09-11). 
  28. ^ Srix. Simple open source static analysis tool for Visual Studio. [27 August 2012]. (原始内容存档于2013-02-03). 
  29. ^ Scovetta, Michael. Yasca. [2019-08-10]. (原始内容存档于2019-08-08). 

外部链接