Skip to content

Commit

Permalink
Merge pull request google#129 from gueraf/gh-pages
Browse files Browse the repository at this point in the history
CppLint: Make "root" flag configurable via CPPLINT.cfg
  • Loading branch information
eglaysher authored Jun 30, 2016
2 parents 6e4b0aa + 2322e4f commit 01f0f70
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpplint/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
filter=+filter1,-filter2,...
exclude_files=regex
linelength=80
root=subdir
"set noparent" option prevents cpplint from traversing directory tree
upwards looking for more .cfg files in parent directories. This option
Expand All @@ -157,6 +158,9 @@
"linelength" allows to specify the allowed line length for the project.
The "root" option is similar in function to the --root flag (see example
above).
CPPLINT.cfg has an effect on files in the same directory and all
sub-directories, unless overridden by a nested configuration file.
Expand Down Expand Up @@ -5886,6 +5890,9 @@ def ProcessConfigOverrides(filename):
_line_length = int(val)
except ValueError:
sys.stderr.write('Line length must be numeric.')
elif name == 'root':
global _root
_root = val
else:
sys.stderr.write(
'Invalid configuration option (%s) in file %s\n' %
Expand Down

0 comments on commit 01f0f70

Please sign in to comment.