---
title: "cpplint | pypx"
description: "Check C++ files configurably against Google's style guide"
canonical_url: "https://pypx.app/packages/cpplint"
meta:
  "og:description": "Check C++ files configurably against Google's style guide"
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_cpplint%2Cversion_2.0.2%2Csummary_~Q2hlY2sgQysrIGZpbGVzIGNvbmZpZ3VyYWJseSBhZ2FpbnN0IEdvb2dsZSdzIHN0eWxlIGd1aWRl%2Clicense_BSD%2BLicense%2Cp_Ii9wYWNrYWdlcy9jcHBsaW50Ig%2Cs_i7mWlhkCzDKm1-8O.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "cpplint 2.0.2"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_cpplint%2Cversion_2.0.2%2Csummary_~Q2hlY2sgQysrIGZpbGVzIGNvbmZpZ3VyYWJseSBhZ2FpbnN0IEdvb2dsZSdzIHN0eWxlIGd1aWRl%2Clicense_BSD%2BLicense%2Cp_Ii9wYWNrYWdlcy9jcHBsaW50Ig%2Cs_i7mWlhkCzDKm1-8O.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **cpplint**

v2.0.2

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

80 KB Python 3.9+ py3-none-anyBSD License

[**Diff **](https://pypx.app/packages/cpplint/diff)

`$ uv add cpplint`

#####################################

##### cpplint - static code checker for C++

Cpplint is a command-line tool to check C/C++ files for style issues according to [Google's C++ style guide](http://google.github.io/styleguide/cppguide.html).

Cpplint used to be developed and maintained by Google Inc. at [google/styleguide](https://github.com/google/styleguide). Nowadays, [Google is no longer maintaining the public version of cpplint](https://github.com/google/styleguide/pull/528#issuecomment-592315430), and pretty much everything in their repo's PRs and issues about cpplint have gone unimplemented.

This fork aims to update cpplint to modern specifications, and be (somewhat) more open to adding fixes and features to make cpplint usable in wider contexts.

# Installation

Use \[`pipx`](https://pipx.pypa.io) to install cpplint from PyPI, run:

```bash
$ pipx install cpplint
```

## Usage

```bash
$ cpplint [OPTIONS] files
```

For full usage instructions, run:

```bash
$ cpplint --help
```

cpplint can also be run as a pre-commit hook by adding to `.pre-commit-config.yaml`:

```yaml
- repo: https://github.com/cpplint/cpplint
  rev: 2.0.0
  hooks:
    - id: cpplint
      args:
        - --filter=-whitespace/line_length,-whitespace/parens
```

# Changes

- python 3 compatibility
- more default file extensions
- customizable file extensions with the --extensions argument
- continuous integration on github
- support for recursive file discovery via the --recursive argument
- support for excluding files via --exclude
- JUnit XML output format
- Overriding repository root auto-detection via --repository
- Support #pragma once as an alternative to header include guards
- ... and [quite a bit](https://github.com/cpplint/cpplint/blob/master/CHANGELOG.rst) more

# Acknowledgements

Thanks to Google Inc. for open-sourcing their in-house tool.

Thanks to [our contributors](https://github.com/cpplint/cpplint/graphs/contributors).

## Maintainers

- [@aaronliu0130](https://github.com/aaronliu0130)
- [@jayvdb](https://github.com/jayvdb)

#### Former

- [@tkruse](https://github.com/tkruse)
- [@mattyclarkson](https://github.com/mattyclarkson)
- [@theandrewdavis](https://github.com/theandrewdavis)

## **Details **

<dl>

<dt>Version</dt>
<dd>2.0.2</dd>

<dt>License</dt>
<dd>BSD License</dd>

<dt>Python</dt>
<dd>&gt;=3.9</dd>

<dt>Maintainer</dt>
<dd>Google Inc., Thibault Kruse, cpplint developers</dd></dl>

## **Links**

- [Homepage](https://github.com/cpplint/cpplint)
- [View on PyPI](https://pypi.org/project/cpplint/)

## **Maintainers **

- Andrew Davis · [theandrewdavis@gmail.com](mailto:theandrewdavis@gmail.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/cpplint#webpage","@type":"WebPage","description":"Check C++ files configurably against Google's style guide","name":"cpplint","url":"https://pypx.app/packages/cpplint","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/cpplint"]}]},{"@id":"https://pypx.app/packages/cpplint#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Check C++ files configurably against Google's style guide","license":"BSD License","name":"cpplint","softwareVersion":"2.0.2"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
