Cpplint
Open source lint-like tool developed by Google
title: "Cpplint" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["static-program-analysis-tools", "google-software", "software-using-the-bsd-license"] description: "Open source lint-like tool developed by Google" topic_path: "general/static-program-analysis-tools" source: "https://en.wikipedia.org/wiki/Cpplint" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Open source lint-like tool developed by Google ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | cpplint |
| title | cpplint |
| developer | |
| released | |
| repo | |
| programming language | Python |
| language count | |
| genre | Static program analysis tool |
| license | 3-clause BSD license |
| website | |
| :: |
| name = cpplint | title = cpplint | logo = | screenshot = | caption = | developer = Google | released = | discontinued = | latest release version = | latest release date = | latest preview version = | latest preview date = | repo = | programming language = Python | operating system = | platform = | size = | language = | language count = | language footnote = | genre = Static program analysis tool | license = 3-clause BSD license | website = cpplint or cpplint.py is an open source lint-like tool developed by Google, designed to ensure that C++ code conforms to Google's coding style guides.
Therefore cpplint implements what Google considers best practices in C++ coding. The script cpplint.py reads source code files and flags deviations from the style guide. It also identifies syntax errors. It is rules based, and uses a number of heuristics to identify bad code.
Cpplint is not perfect, as it can suffer from occasional false positives and negatives. Nevertheless, it is still a very useful tool for style enforcement.
Moreover rules can be fine-grained selected using the options --verbose and --filter.
Line length rule can be configured with option --linelength
and file extensions can be configured with --extensions (by default: 'h', 'cpp', 'cc', 'cu' and 'cuh').
Some options can be stored in a configuration file CPPLINT.cfg.
cpplint is implemented as a Python script. It is distributed under the 3 clause BSD license.
References
References
- Dutko, Adam M.. (2011). "The Relational Database: a New Static Analysis Tool?". Cleveland State University.
- Weinberger, Benjy. "Google C++ Style Guide, section cpplint".
- ((Google)). "GIT URL for cpplint.py".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::