Skip to content

Commit 55e6594

Browse files
committed
Fixup cpplint.py
1 parent 9d4b827 commit 55e6594

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

scripts/cpplint.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,7 @@
282282
# flag. By default all errors are on, so only add here categories that should be
283283
# off by default (i.e., categories that must be enabled by the --filter= flags).
284284
# All entries here should start with a '-' or '+', as in the --filter= flag.
285-
_DEFAULT_FILTERS = [
286-
'-build/include_alpha',
287-
'-whitespace/',
288-
'-readability/braces',
289-
'-readability/identifier_spacing',
290-
]
285+
_DEFAULT_FILTERS = ['-build/include_alpha']
291286

292287
# The default list of categories suppressed for C (not C++) files.
293288
_DEFAULT_C_SUPPRESSED_CATEGORIES = [

scripts/run_diff.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ then
3737
echo "Ensure cpplint.py is inside the $script_folder directory then run again"
3838
exit 1
3939
else
40-
cmd='${script_folder}/cpplint.py $file 2>&1 >/dev/null'
40+
cmd='${script_folder}/cpplint.py --filter=-whitespace/operators,-readability/identifier_spacing $file 2>&1 >/dev/null'
4141
fi
4242
elif [[ "$mode" == "DOXYGEN" ]]
4343
then
@@ -109,7 +109,7 @@ for file in $diff_files; do
109109

110110
# Run the linting script and filter:
111111
# The errors from the linter go to STDERR so must be redirected to STDOUT
112-
result=$(eval $cmd | "${script_folder}/filter_by_lines.py" "$file" "$added_lines_file" "$absolute_repository_root")
112+
result=$(eval "${cmd}" | "${script_folder}/filter_by_lines.py" "$file" "$added_lines_file" "$absolute_repository_root")
113113

114114
# Providing some errors were relevant we print them out
115115
if [ "$result" ]

0 commit comments

Comments
 (0)