From 6cf97685f3396d1b2361a55a33e3dcc7936ce5ad Mon Sep 17 00:00:00 2001 From: Akira Baruah Date: Wed, 26 Apr 2017 22:50:41 -0700 Subject: [PATCH] cpplint: add `--cpplint-root` option --- waflib/extras/cpplint.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/waflib/extras/cpplint.py b/waflib/extras/cpplint.py index 7916d2a5..ab5d5eba 100644 --- a/waflib/extras/cpplint.py +++ b/waflib/extras/cpplint.py @@ -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