--- id: cpplint version: "2.0.2" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # cpplint — Check C++ files configurably against Google's style guide License: permissive · Maintenance: active · Downloads: 624.1K/mo ## What it is and what it does Cpplint is a Python-based linter that enforces Google's C++ style guide on source files. It originated as Google's internal tool but has been maintained as a community fork since Google stopped updating the public version. The tool runs as a command-line utility and can be integrated into pre-commit hooks or CI pipelines to catch style violations early. The fork modernizes the original tool with Python 3 compatibility, recursive file discovery, customizable file extensions, JUnit XML output, and support for modern C++ features like `#pragma once`. It has no runtime dependencies and installs cleanly on Python 3.9 through 3.13, making it lightweight to add to development workflows. Use it for: - Enforce consistent C++ code style across a team or project by running cpplint in CI/CD pipelines to reject non-compliant pull requests. - Integrate cpplint as a pre-commit hook to catch style violations before code is committed, reducing review friction. - Scan large codebases recursively with custom file extensions to identify style issues across multiple directories and file types. - Generate JUnit XML reports from cpplint output for integration with test dashboards and quality gates in build systems. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cpplint is a command-line static code checker that scans C/C++ files for style violations against Google's C++ style guide, with support for recursive file discovery, custom file extensions, and multiple output formats. Yes. Cpplint is actively maintained, has no dependencies, installs easily, and is well-suited for teams adopting Google's C++ style guide. The permissive BSD license and broad Python version support (3.9–3.13) make it a low-risk addition to development workflows. Install via pipx to keep it isolated from project dependencies. ## Install pip install cpplint uv add cpplint poetry add cpplint ## Installing cpplint Before you install: Low install friction with no runtime dependencies. Actively maintained with recent commits and a stable release cadence; supports Python 3.9 through 3.13. License in practice: BSD-3-Clause is permissive and poses no restrictions on commercial or private use; you can use and modify cpplint freely. Quickstart: pipx install cpplint cpplint myfile.cpp # Or as a pre-commit hook in .pre-commit-config.yaml: # - repo: https://github.com/cpplint/cpplint # rev: 2.0.0 # hooks: # - id: cpplint Requires Python 3.9 or later; typically installed via pipx rather than pip to avoid polluting the project environment. Verify before relying: - Whether the fork's feature additions (recursive discovery, custom extensions, JUnit output) are stable and well-tested in production workflows. - How actively the current maintainers (@aaronliu0130, @jayvdb) respond to issues and pull requests relative to the original Google version. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 624.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags C++ style checker, static code analysis C++, Google C++ style linter, C++ lint tool, code quality checker C++, style guide enforcement, c++-linting, style-enforcement, pre-commit-hook [View on SkillFed](https://skillfed.io/packages/cpplint) · [View on PyPI](https://pypi.org/project/cpplint/)