macOS
brew install cppchecklocal Homebrew formula metadata
sudo port install cppcheckMacPorts ports tree · devel/cppcheck/Portfile · 来源: api.github.com
安装
brew install cppchecklocal Homebrew formula metadata
sudo port install cppcheckMacPorts ports tree · devel/cppcheck/Portfile · 来源: api.github.com
sudo apk add cppcheckAlpine Linux edge package indexes · cppcheck · 来源: dl-cdn.alpinelinux.org
sudo apt install cppcheckDebian stable package indexes · cppcheck · 来源: deb.debian.org
sudo dnf install cppcheckFedora Rawhide package metadata · cppcheck · 来源: dl.fedoraproject.org
nix profile install nixpkgs#cppchecknixpkgs package indexes · pkgs/by-name/cp/cppcheck/package.nix · 来源: api.github.com
sudo pacman -S cppcheckArch Linux sync databases · cppcheck · 来源: geo.mirror.pkgbuild.com
sudo zypper install cppcheckopenSUSE Tumbleweed package metadata · cppcheck · 来源: download.opensuse.org
choco install cppcheckChocolatey community package catalog · cppcheck · 来源: community.chocolatey.org
scoop install main/cppcheckScoop official bucket manifest trees · bucket/cppcheck.json · 来源: api.github.com
winget install --id Cppcheck.Cppcheck -eWindows Package Manager source index · Cppcheck.Cppcheck · 来源: cdn.winget.microsoft.com
概览
Static analysis of C and C++ code
历史
Cppcheck is an open-source static analysis tool for C and C++ code. It focuses on bugs that compilers commonly miss, especially undefined behavior and dangerous constructs, while trying to keep false positives low.
The upstream README notes that the original name was C++check and was later changed to Cppcheck. It also says that despite the name, Cppcheck is designed for both C and C++.
The GitHub repository was created in March 2009. The README states that the repository moved from danmar/cppcheck to cppcheck-opensource/cppcheck, and the official website now links current source downloads to the cppcheck-opensource GitHub releases.
Cppcheck has kept both command-line and graphical user interfaces. Upstream build documentation covers CMake, Visual Studio, Qt Creator, GNU make, MinGW, and cross-compiling, which explains why it appears in many OS package ecosystems.
The supplied package facts list Cppcheck across Homebrew, MacPorts, Debian, Ubuntu, Fedora/dnf, Alpine/apk, Arch/pacman, Nix, openSUSE/zypper, Chocolatey, Scoop, winget, and more. Upstream's README also explicitly points users to Homebrew, MacPorts, Conda, Conan, and other distribution channels, while warning that third-party packages may lag releases.
The official website lists integrations with development tools such as Buildbot, CLion, Code::Blocks, CodeLite, Eclipse, and others. That integration footprint is part of why Cppcheck is common in CI and editor workflows.
Cppcheck is used from the command line and GUI to analyze C/C++ projects for memory issues, out-of-bounds access, uninitialized variables, null dereferences, invalid shifts, integer overflows, and other undefined behavior. Upstream also documents addon, rules, and platform data files as part of packaged installs.
Cppcheck is package-significant because static analyzers are often installed as developer tools rather than vendored into one project. Packagers need to track release cadence, optional PCRE/rules support, GUI builds, data-file install paths, and the upstream repository move while preserving a stable cppcheck command for CI.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
cppcheck | cli | 全局可执行文件 | |
cppcheck-htmlreport | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/cppcheck-opensource/cppcheck
安装元数据
| 软件包键 | brew:cppcheck |
|---|---|
| 版本 | 2.21.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/cppcheck |
| 主页 | https://sourceforge.net/projects/cppcheck/ |
| 仓库 | https://github.com/cppcheck-opensource/cppcheck |
| 上游文档 | https://cppcheck.sourceforge.io/ |
| 许可证 | GPL-3.0-or-later |
| 源码归档 | https://github.com/cppcheck-opensource/cppcheck/archive/refs/tags/2.21.0.tar.gz |
| 最后更新 | 2026-07-05T00:14:30+09:00 |
| Pulse | updated |
| 依赖 | tinyxml2 |
| 构建依赖 | cmake, python@3.14 |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cppcheck |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
cppcheck 2.17.1-2
tool for static C/C++ code analysis (CLI)
https://sourceforge.net/p/cppcheck/wiki/Home/
sudo apt install cppcheckcppcheck-gui 2.17.1-2
tool for static C/C++ code analysis (GUI)
https://sourceforge.net/p/cppcheck/wiki/Home/
sudo apt install cppcheck-guicppcheck
nix profile install nixpkgs#cppcheckcppcheck 2.13.0-2ubuntu3
tool for static C/C++ code analysis (CLI)
https://sourceforge.net/p/cppcheck/wiki/Home/
sudo apt install cppcheckcppcheck-gui 2.13.0-2ubuntu3
tool for static C/C++ code analysis (GUI)
https://sourceforge.net/p/cppcheck/wiki/Home/
sudo apt install cppcheck-guicppcheck 2.21.0-r0
Static analysis tool for C/C++ code
https://cppcheck.sourceforge.io/
sudo apk add cppcheckcppcheck-doc 2.21.0-r0
Static analysis tool for C/C++ code (documentation)
https://cppcheck.sourceforge.io/
sudo apk add cppcheck-doccppcheck-gui 2.21.0-r0
Qt gui for cppcheck
https://cppcheck.sourceforge.io/
sudo apk add cppcheck-guicppcheck-htmlreport 2.21.0-r0
Utility to generate a html report of a XML file produced by cppcheck
https://cppcheck.sourceforge.io/
sudo apk add cppcheck-htmlreportcppcheck 2.21.0-1.fc45
Tool for static C/C++ code analysis
http://cppcheck.sourceforge.io/
sudo dnf install cppcheckcppcheck-gui 2.21.0-1.fc45
Graphical user interface for cppcheck
http://cppcheck.sourceforge.io/
sudo dnf install cppcheck-guicppcheck-htmlreport 2.21.0-1.fc45
HTML reporting for cppcheck
http://cppcheck.sourceforge.io/
sudo dnf install cppcheck-htmlreportcppcheck 2.21.0-1
A tool for static C/C++ code analysis
http://cppcheck.sourceforge.net/
sudo pacman -S cppcheckcppcheck 2.21.0-1.1
A tool for static C/C++ code analysis
https://github.com/cppcheck-opensource/cppcheck
sudo zypper install cppcheckcppcheck-gui 2.21.0-1.1
A tool for static C/C++ code analysis
https://github.com/cppcheck-opensource/cppcheck
sudo zypper install cppcheck-guicppcheck
sudo port install cppcheck来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.