cppcheck

Install command:
brew install cppcheck

Static analysis of C and C++ code

https://sourceforge.net/projects/cppcheck/

License: GPL-3.0-or-later

Development: Pull requests

Formula JSON API: /api/formula/cppcheck.json

Formula code: cppcheck.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 2.22.0
head ⚡️ HEAD

Depends on:

tinyxml2 11.0.0 Improved tinyxml (in memory efficiency and size)

Depends on when building from source:

cmake 4.4.5 Cross-platform make
python@3.15 3.15.2 Interpreted, interactive, object-oriented programming language

Uses from macOS: libxml2 (build)

Binaries: cppcheck, cppcheck-htmlreport

GitHub Packages downloads:

Last 30 days23,748
Downloads1,417,380
Analytics install events (30 days)2,832
Downloads / install events (30 days)8.4×

Source: GitHub Packages, fetched 2026-11-09T00:53:18Z. Analytics dates: 2026-10-10 to 2026-11-09. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs2,8326,44220,224
Installs (--HEAD)0426
Installs on Request2,8326,44220,223
Installs on Request (--HEAD)0426
Build Errors2