Therefore cpplint implements what Google considers to be "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.py suffers from both false positives and false negatives. False positives can be eliminated by tagging lines with
// NOLINT (or
// NOLINT(rule) to suppress only the incriminated
Moreover rules can be fine-grained selected using the options
--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
- Dutko, Adam. "THE RELATIONAL DATABASE: A NEW STATIC ANALYSIS TOOL?" (PDF).
- Weinberger, Benjy. "Google C++ Style Guide, section cpplint".
- "GIT URL for cpplint.py".
|last1=in Authors list (help)
|This programming-tool-related article is a stub. You can help Wikipedia by expanding it.|