1 ## wraps local cpplint to produce verbose output without code harness
6 FILTERS
=('cpplint --verbose=0 --linelength=100 --filter=-legal/copyright,-build/include_order,'
7 '-build/c++11,-build/namespaces,-build/class,-build/include,-build/include_subdir,-readability/inheritance,'
8 '-readability/function,-readability/casting,-readability/namespace,-readability/alt_tokens,'
9 '-readability/braces,-readability/fn_size,-whitespace/comments,-whitespace/braces,-whitespace/empty_loop_body,'
10 '-whitespace/indent,-whitespace/newline,-runtime/explicit,-runtime/arrays,-runtime/int,-runtime/references,'
11 '-runtime/string,-runtime/operator,-runtime/printf').split(' ')
15 for loopfile
in files
:
16 newargs
= FILTERS
+ [loopfile
]
21 except SystemExit as e
:
22 last_result
= e
.args
[0]
23 result
= result
or last_result
25 write_code_lines(loopfile
)
28 def write_code_lines(filename
):
29 with
open(filename
, 'r') as f
:
32 if (not '// by md-split' in line
):
33 sys
.stdout
.write('%3d %s' % (linenum
, line
))
36 if __name__
== '__main__':