Cpplint Explained

cpplint
cpplint
Developer:Google
Programming Language:Python
Genre:Static program analysis tool
License:3-clause BSD license

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.[1]

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.[2]

Moreover rules can be fine-grained selected using the options and .Line length rule can be configured with option and file extensions can be configured with (by default: 'h', 'cpp', 'cc', 'cu' and 'cuh').Some options can be stored in a configuration file .

cpplint is implemented as a Python script.[3] It is distributed under the 3 clause BSD license.

See also

Notes and References

  1. The Relational Database: a New Static Analysis Tool? . PDF . Dutko . Adam M. . 2011 . 750403495 . 2572-3480 . 733 . 20 . Master of Science . Cleveland State University . live . https://web.archive.org/web/20180518113320/https://engagedscholarship.csuohio.edu/cgi/viewcontent.cgi?referer=&httpsredir=1&article=1732&context=etdarchive . 18 May 2018.
  2. Web site: Google C++ Style Guide, section cpplint. Benjy. Weinberger.
  3. Web site: ((Google)) . GIT URL for cpplint.py . GitHub.