OrangesCpplint¶
Provides functions to set up the cpplint static analysis tool.
Configure cpplint for a target¶
- oranges_enable_cpplint¶
oranges_enable_cpplint (<target> [IGNORE <checks...>] [VERBOSITY <level>] [EXTRA_ARGS <args...>] [LANGS <C|CXX>...])
Configures cpplint for the given <target>
by manipulating the target’s <LANG>_CPPLINT
properties.
If the CPPLINT_OFF
variable is set to ON
, this function does nothing.
Options:
IGNORE
A list of cpplint checks to ignore for this target. Each one may optionally begin with a ‘-’ character, though this is not required. f not specified, the value of the
CPPLINT_IGNORE
variable will be used.VERBOSITY
An integer verbosity level between 0 and 5 (inclusive). If not specified, the value of the
CPPLINT_VERBOSITY
variable will be used.EXTRA_ARGS
Extra arguments to pass to cpplint verbatim. If not specified, the value of the
CPPLINT_EXTRA_ARGS
variable will be used.LANGS
Languages for which to enable cpplint. Valid values are
C
orCXX
. If no languages are specified, this function will configure cpplint for both valid languages.
Configure cpplint globally¶
- oranges_create_cpplint_target¶
oranges_create_cpplint_target ([IGNORE <checks...>] [VERBOSITY <level>] [EXTRA_ARGS <args...>])
Creates a custom target named cpplint
that executes cpplint
over the entire source tree.
If the CPPLINT_OFF
variable is set to ON
, this function does nothing.
Note that all arguments are optional. Options:
IGNORE
A list of cpplint checks to ignore. Each one may optionally begin with a ‘-’ character, though this is not required. If not specified, the value of the
CPPLINT_IGNORE
variable will be used.VERBOSITY
An integer verbosity level between 0 and 5 (inclusive). If not specified, the value of the
CPPLINT_VERBOSITY
variable will be used.EXTRA_ARGS
Extra arguments to pass to cpplint verbatim. If not specified, the value of the
CPPLINT_EXTRA_ARGS
variable will be used.
Cache variables¶
- CPPLINT_PROGRAM¶
Path to the cpplint executable, used by oranges_enable_cpplint()
.
An environment variable with this name may also be set.
- CPPLINT_IGNORE¶
Space-separated list of cpplint checks to be ignored by default in calls to oranges_enable_cpplint()
that do not
explicitly override this option. The environment variable with this name, if set, will initialize this variable; otherwise,
a default set of checks will be ignored.
- CPPLINT_VERBOSITY¶
Default cpplint verbosity level to be used by calls to oranges_enable_cpplint()
that do not explicitly
specify a verbosity level. The environment variable with this name, if set, will initialize this variable; otherwise, this
variable defaults to 0
.
- CPPLINT_EXTRA_ARGS¶
Space-separated arguments that will be passed to cpplint verbatim in calls to oranges_enable_cpplint()
that do not explicitly override this option. The environment variable with this name, if set, will initialize this
cache variable.
- CPPLINT_OFF¶
When this variable is set to ON
, calls to oranges_enable_cpplint()
do nothing. The environment variable with
this name, if set, will initialize this variable; otherwise, this variable defaults to OFF
.
Environment variables¶
- CPPLINT_PROGRAM¶
Initializes the value of the CPPLINT_PROGRAM
variable.
- CPPLINT_IGNORE¶
Initializes the CPPLINT_IGNORE
variable.
- CPPLINT_VERBOSITY¶
Initializes the CPPLINT_VERBOSITY
variable.
- CPPLINT_EXTRA_ARGS¶
Initializes the CPPLINT_EXTRA_ARGS
variable.
- CPPLINT_OFF¶
Initializes the CPPLINT_OFF
variable.
See also
- Module
OrangesClangTidy
Module for clang-tidy
- Module
OrangesCppcheck
Module for cppcheck
- Module
OrangesIWYU
Module for include-what-you-use
- Module
OrangesStaticAnalysis
Aggregate module for enabling all static analysis tools