skillfed

cpplint

Check C++ files configurably against Google's style guide

cpplint v2.0.2 624.1K downloads/30d#5,702 on PyPI1,842
Permissive license BSD-3-Clause Active released

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 on this page — 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

cpplint on PyPI

pip

pip install cpplint

uv

uv add cpplint

poetry

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 the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 493 days since the last release
Last repo commit
First released
Downloads 624,130/month — #5,702 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cpplint-2.0.2-py3-none-any.whl

Keywords: c++, cpp, google style, lint

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: End Users/DesktopLicense :: Freely DistributableLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: C++Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Quality Assurance

Tags

C++ style checkerstatic code analysis C++Google C++ style linterC++ lint toolcode quality checker C++style guide enforcement
c++-lintingstyle-enforcementpre-commit-hook

More Quality Assurance packages