🍺 BREW Explorer

← all formulae

cppcheck

brew install cppcheck v2.21.0 GPL-3.0-or-later

Static analyzer for C and C++ code that detects memory leaks, buffer overruns, and other defects.

Why you might care

Cppcheck finds common bugs and security issues in C/C++ codebases without executing code, complementing compiler warnings. It's portable across platforms, has minimal dependencies, and works well in CI/CD pipelines. Use it when you need deeper static analysis beyond what your compiler provides.

Categories

Alternatives

clang-tidy splint infer gcc
2.0k
30-day installs · #976
4.7k
90-day · #1125
19.0k
365-day · #1083

Runtime dependencies

Build dependencies

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "clang-tidy",
    "splint",
    "infer",
    "gcc"
  ],
  "build_dependencies": [
    "cmake",
    "python@3.14"
  ],
  "categories": [
    "linter",
    "scanner",
    "security"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "tinyxml2"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Static analysis of C and C++ code",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:36:39+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "cppcheck",
  "github_default_branch": null,
  "github_last_commit_at": null,
  "github_readme_excerpt": null,
  "github_repo": null,
  "github_stars": null,
  "github_topics": [],
  "homepage": "https://sourceforge.net/projects/cppcheck/",
  "homepage_og_description": "Download cppcheck for free. Static source code analysis tool for C and C++ code. Static analysis of C/C++ code. Checks for: memory leaks, mismatching allocation-deallocation, buffer overrun, and many more.",
  "homepage_og_image": null,
  "homepage_title": "cppcheck download | SourceForge.net",
  "installs_30d": 1985,
  "installs_365d": 19008,
  "installs_90d": 4676,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-3.0-or-later",
  "llm_generated_at": "2026-06-20T23:48:12+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "cppcheck",
  "oldnames": [],
  "one_liner": "Static analyzer for C and C++ code that detects memory leaks, buffer overruns, and other defects.",
  "optional_dependencies": [],
  "rank_30d": 976,
  "rank_365d": 1083,
  "rank_90d": 1125,
  "raw_hash": "2bf8a018a886a4c5",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/c/cppcheck.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "python@3.14"
  ],
  "uses_from_macos": [
    {
      "libxml2": "build"
    }
  ],
  "version_head": "HEAD",
  "version_stable": "2.21.0",
  "versioned_formulae": [],
  "why_use_this": "Cppcheck finds common bugs and security issues in C/C++ codebases without executing code, complementing compiler warnings. It\u0027s portable across platforms, has minimal dependencies, and works well in CI/CD pipelines. Use it when you need deeper static analysis beyond what your compiler provides."
}