Skip to content

Commit 01f0f70

Browse files
authored
Merge pull request google#129 from gueraf/gh-pages
CppLint: Make "root" flag configurable via CPPLINT.cfg
2 parents 6e4b0aa + 2322e4f commit 01f0f70

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cpplint/cpplint.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
filter=+filter1,-filter2,...
143143
exclude_files=regex
144144
linelength=80
145+
root=subdir
145146
146147
"set noparent" option prevents cpplint from traversing directory tree
147148
upwards looking for more .cfg files in parent directories. This option
@@ -157,6 +158,9 @@
157158
158159
"linelength" allows to specify the allowed line length for the project.
159160
161+
The "root" option is similar in function to the --root flag (see example
162+
above).
163+
160164
CPPLINT.cfg has an effect on files in the same directory and all
161165
sub-directories, unless overridden by a nested configuration file.
162166
@@ -5886,6 +5890,9 @@ def ProcessConfigOverrides(filename):
58865890
_line_length = int(val)
58875891
except ValueError:
58885892
sys.stderr.write('Line length must be numeric.')
5893+
elif name == 'root':
5894+
global _root
5895+
_root = val
58895896
else:
58905897
sys.stderr.write(
58915898
'Invalid configuration option (%s) in file %s\n' %

0 commit comments

Comments
 (0)