cpplint: add `--cpplint-root` option

This commit is contained in:
Akira Baruah 2017-04-26 22:50:41 -07:00 committed by Thomas Nagy
parent 2a7370c597
commit 60635533c5
1 changed files with 4 additions and 0 deletions

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