2
0
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:
Akira Baruah 2017-04-26 22:50:41 -07:00 committed by ita1024
parent 3f15e5e2c8
commit 6cf97685f3

View File

@ -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