mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-18 07:57:05 +01:00
cpplint: add --cpplint-root
option
This commit is contained in:
parent
3f15e5e2c8
commit
6cf97685f3
4
waflib/extras/cpplint.py
vendored
4
waflib/extras/cpplint.py
vendored
@ -69,6 +69,9 @@ def options(opt):
|
||||
help='specify the log level (default: 1)')
|
||||
opt.add_option('--cpplint-break', default=5, type='int', dest='CPPLINT_BREAK',
|
||||
help='break the build if error >= level (default: 5)')
|
||||
opt.add_option('--cpplint-root', type='string',
|
||||
default=None, dest='CPPLINT_ROOT',
|
||||
help='root directory used to derive header guard')
|
||||
opt.add_option('--cpplint-skip', action='store_true',
|
||||
default=False, dest='CPPLINT_SKIP',
|
||||
help='skip cpplint during build')
|
||||
@ -184,6 +187,7 @@ class cpplint(Task.Task):
|
||||
cpplint_tool._cpplint_state.output_format = self.env.CPPLINT_OUTPUT
|
||||
cpplint_tool._cpplint_state.SetFilters(self.env.CPPLINT_FILTERS)
|
||||
cpplint_tool._line_length = self.env.CPPLINT_LINE_LENGTH
|
||||
cpplint_tool._root = self.env.CPPLINT_ROOT
|
||||
cpplint_tool.ProcessFile(self.inputs[0].abspath(), self.env.CPPLINT_LEVEL)
|
||||
return critical_errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user