Cppcheck

維基百科,自由的百科全書
Cppcheck
原作者Daniel Marjamäki
首次發布2007年5月8日,​17年前​(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). 

外部連結