Skip to content

Commit 554cb54

Browse files
committed
Adjust cpplint to disable whitespace checks by default
1 parent 6ce0dba commit 554cb54

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/cpplint.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,9 @@
224224
'readability/inheritance',
225225
'readability/multiline_comment',
226226
'readability/multiline_string',
227-
'readability/namespace',
227+
'readability/identifier_spacing',
228228
'readability/identifiers',
229+
'readability/namespace',
229230
'readability/nolint',
230231
'readability/nul',
231232
'readability/strings',
@@ -281,7 +282,12 @@
281282
# flag. By default all errors are on, so only add here categories that should be
282283
# off by default (i.e., categories that must be enabled by the --filter= flags).
283284
# All entries here should start with a '-' or '+', as in the --filter= flag.
284-
_DEFAULT_FILTERS = ['-build/include_alpha']
285+
_DEFAULT_FILTERS = [
286+
'-build/include_alpha',
287+
'-whitespace/',
288+
'-readability/braces',
289+
'-readability/identifier_spacing',
290+
]
285291

286292
# The default list of categories suppressed for C (not C++) files.
287293
_DEFAULT_C_SUPPRESSED_CATEGORIES = [
@@ -3624,7 +3630,7 @@ def CheckOperatorSpacing(filename, clean_lines, linenum, error):
36243630

36253631
# check any inherited classes don't have a space between the type and the :
36263632
if Search(r'(struct|class)\s[\w_]*\s+:', line):
3627-
error(filename, linenum, 'readability/identifiers', 4, 'There shouldn\'t be a space between class identifier and :')
3633+
error(filename, linenum, 'readability/identifier_spacing', 4, 'There shouldn\'t be a space between class identifier and :')
36283634

36293635
#check type definitions end with t
36303636
# Look for class declarations and check the final character is a t

0 commit comments

Comments
 (0)