# Installer cppcheck avec Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de cppcheck pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:cppcheck
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install cppcheck
```

  Preuve: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cppcheck
```

  Preuve: MacPorts ports tree: devel/cppcheck/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add cppcheck
```

  Preuve: Alpine Linux edge package indexes: cppcheck from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install cppcheck
```

  Preuve: Debian stable package indexes: cppcheck from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install cppcheck
```

  Preuve: Fedora Rawhide package metadata: cppcheck from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#cppcheck
```

  Preuve: nixpkgs package indexes: pkgs/by-name/cp/cppcheck/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S cppcheck
```

  Preuve: Arch Linux sync databases: cppcheck from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install cppcheck
```

  Preuve: openSUSE Tumbleweed package metadata: cppcheck from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install cppcheck
```

  Preuve: Chocolatey community package catalog: cppcheck from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','cloudquery'

- Scoop (92%):

```sh
scoop install main/cppcheck
```

  Preuve: Scoop official bucket manifest trees: bucket/cppcheck.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Cppcheck.Cppcheck -e
```

  Preuve: Windows Package Manager source index: Cppcheck.Cppcheck from https://cdn.winget.microsoft.com/cache/source.msix

## Faits du paquet

- **Clé du paquet:** brew:cppcheck
- **Gestionnaire de paquets:** Homebrew
- **Page du gestionnaire de paquets:** <https://formulae.brew.sh/formula/cppcheck>
- **Version:** 2.21.0
- **Résumé source:** Static analysis of C and C++ code
- **Page d'accueil:** <https://sourceforge.net/projects/cppcheck/>
- **Dépôt:** <https://github.com/cppcheck-opensource/cppcheck>
- **Docs amont:** <https://sourceforge.net/projects/cppcheck/>
- **Licence:** GPL-3.0-or-later
- **Archive source:** <https://github.com/cppcheck-opensource/cppcheck/archive/refs/tags/2.21.0.tar.gz>
- **Dernière mise à jour:** 2026-07-05T00:14:30+09:00
- **Généré:** 2026-08-04T22:13:35+00:00

## exécutables

- cppcheck (cli)
- cppcheck-htmlreport (cli)
- cppcheck (alias)
- cppcheck-htmlreport (alias)

## Dépendances

- tinyxml2

## Dépendances de compilation

- cmake
- python@3.14

## Comportement d'installation

- hook post-installation: non défini
- Bouteille: disponible sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Version et fraîcheur

- page générée: 2026-08-04
- version du gestionnaire: 2.21.0
- gestionnaire mis à jour: 2026-07-05
- données locales: OK
- dépôt amont: https://github.com/cppcheck-opensource/cppcheck
- dernière version détectée: 2.21.0 (à jour)
## Historique du projet et usages

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.

### Historique du projet

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.

### Historique d'adoption

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.

### Modes d'utilisation

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.

### Pourquoi les passionnés de paquets s'y intéressent

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.

### Chronologie

- 2009: Public GitHub repository created.
- 2025: The upstream README documents the repository move to cppcheck-opensource/cppcheck.
- 2026: Official releases include Cppcheck 2.21.0.

### Related projects

- Cppcheck Premium is the upstream commercial offering with additional checks and support.
- The official website lists editor and CI integrations, including Buildbot, CLion, Code::Blocks, CodeLite, and Eclipse.

### Sources

- <https://api.github.com/repos/cppcheck-opensource/cppcheck>
- <https://raw.githubusercontent.com/danmar/cppcheck/main/readme.md>
- <https://cppcheck.sourceforge.io/>
- <https://api.github.com/repos/cppcheck-opensource/cppcheck/releases?per_page=5>
- <https://sourceforge.net/projects/cppcheck/rss?path=/cppcheck>


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals

## Détails de la base source

- **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:** head, stable

## Autres enregistrements de gestionnaires de paquets

- Debian apt - cppcheck - 2.17.1-2: normalized package name match | Debian stable package indexes: cppcheck from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tool for static C/C++ code analysis (CLI) | https://sourceforge.net/p/cppcheck/wiki/Home/
- Debian apt - cppcheck-gui - 2.17.1-2: normalized package name match | Debian stable package indexes: cppcheck-gui from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tool for static C/C++ code analysis (GUI) | https://sourceforge.net/p/cppcheck/wiki/Home/
- Nix - cppcheck: normalized package name match | nixpkgs package indexes: pkgs/by-name/cp/cppcheck/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cppcheck - 2.13.0-2ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: cppcheck from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | tool for static C/C++ code analysis (CLI) | https://sourceforge.net/p/cppcheck/wiki/Home/
- Ubuntu apt - cppcheck-gui - 2.13.0-2ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: cppcheck-gui from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | tool for static C/C++ code analysis (GUI) | https://sourceforge.net/p/cppcheck/wiki/Home/
- apk - cppcheck - 2.21.0-r0: normalized package name match | Alpine Linux edge package indexes: cppcheck from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Static analysis tool for C/C++ code | https://cppcheck.sourceforge.io/
- apk - cppcheck-doc - 2.21.0-r0: normalized package name match | Alpine Linux edge package indexes: cppcheck-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Static analysis tool for C/C++ code (documentation) | https://cppcheck.sourceforge.io/
- apk - cppcheck-gui - 2.21.0-r0: normalized package name match | Alpine Linux edge package indexes: cppcheck-gui from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Qt gui for cppcheck | https://cppcheck.sourceforge.io/
- apk - cppcheck-htmlreport - 2.21.0-r0: normalized package name match | Alpine Linux edge package indexes: cppcheck-htmlreport from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Utility to generate a html report of a XML file produced by cppcheck | https://cppcheck.sourceforge.io/
- dnf - cppcheck - 2.21.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: cppcheck from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Tool for static C/C++ code analysis | http://cppcheck.sourceforge.io/
- dnf - cppcheck-gui - 2.21.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: cppcheck-gui from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Graphical user interface for cppcheck | http://cppcheck.sourceforge.io/
- dnf - cppcheck-htmlreport - 2.21.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: cppcheck-htmlreport from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | HTML reporting for cppcheck | http://cppcheck.sourceforge.io/
- pacman - cppcheck - 2.21.1-1: normalized package name match | Arch Linux sync databases: cppcheck from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool for static C/C++ code analysis | http://cppcheck.sourceforge.net/
- zypper - cppcheck - 2.21.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: cppcheck from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A tool for static C/C++ code analysis | https://github.com/cppcheck-opensource/cppcheck
- zypper - cppcheck-gui - 2.21.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: cppcheck-gui from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A tool for static C/C++ code analysis | https://github.com/cppcheck-opensource/cppcheck
- MacPorts - cppcheck: normalized package name match | MacPorts ports tree: devel/cppcheck/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Liens liés

- [Terminal utility packages](https://pkg.so/fr/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/fr/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/fr/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/fr/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://pkg.so/fr/brew/python-3-14/) - Build dependency declared by Homebrew.
- [cmake](https://pkg.so/fr/brew/cmake/) - Build dependency declared by Homebrew.
- [cflow](https://pkg.so/fr/brew/cflow/) - Shares pkgdb curated category or tags: c, cli, developer-tools, static-analysis.
- [coccinelle](https://pkg.so/fr/brew/coccinelle/) - Shares pkgdb curated category or tags: c, cli, developer-tools, static-analysis.
- [esbmc](https://pkg.so/fr/brew/esbmc/) - Shares pkgdb curated category or tags: c, cli, developer-tools, static-analysis.
- [splint](https://pkg.so/fr/brew/splint/) - Shares pkgdb curated category or tags: c, cli, developer-tools, static-analysis.
- [shellcheck](https://pkg.so/fr/brew/shellcheck/) - Shares pkgdb curated category or tags: cli, developer-tools, static-analysis.
- [semgrep](https://pkg.so/fr/brew/semgrep/) - Shares pkgdb curated category or tags: cli, developer-tools, static-analysis.
- [periphery](https://pkg.so/fr/brew/periphery/) - Shares pkgdb curated category or tags: cli, developer-tools, static-analysis.
- [pyright](https://pkg.so/fr/brew/pyright/) - Shares pkgdb curated category or tags: cli, developer-tools, static-analysis.
- [cbmc](https://pkg.so/fr/brew/cbmc/) - Local package facts share a topical domain. Shared terms: analysis, c, c-plus-plus, cli, developer.
- [checkstyle](https://pkg.so/fr/brew/checkstyle/) - Local package facts share a topical domain. Shared terms: analysis, cli, code, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/cppcheck.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cppcheck.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
