Skip to content

Commit df45bdb

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#1524 from reuk/reuk/fix-linter
Disable dowhile brace check by default
2 parents 4b39446 + a00edd3 commit df45bdb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

scripts/cpplint.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -220,20 +220,21 @@
220220
'readability/casting',
221221
'readability/check',
222222
'readability/constructors',
223+
'readability/dowhile',
223224
'readability/fn_size',
225+
'readability/function_comment'
226+
'readability/identifier_spacing',
227+
'readability/identifiers',
224228
'readability/inheritance',
225229
'readability/multiline_comment',
226230
'readability/multiline_string',
227-
'readability/identifier_spacing',
228-
'readability/identifiers',
229231
'readability/namespace',
230232
'readability/nolint',
231233
'readability/nul',
232234
'readability/strings',
233-
'readability/todo',
234235
'readability/throw',
236+
'readability/todo',
235237
'readability/utf8',
236-
'readability/function_comment'
237238
'runtime/arrays',
238239
'runtime/casting',
239240
'runtime/endl',
@@ -282,7 +283,7 @@
282283
# flag. By default all errors are on, so only add here categories that should be
283284
# off by default (i.e., categories that must be enabled by the --filter= flags).
284285
# All entries here should start with a '-' or '+', as in the --filter= flag.
285-
_DEFAULT_FILTERS = ['-build/include_alpha']
286+
_DEFAULT_FILTERS = ['-build/include_alpha', '-readability/dowhile']
286287

287288
# The default list of categories suppressed for C (not C++) files.
288289
_DEFAULT_C_SUPPRESSED_CATEGORIES = [
@@ -4197,7 +4198,7 @@ def CheckDoWhile(filename, clean_lines, linenum, error):
41974198
if Search(r'}\s*while\s*\(', line):
41984199
do_found, num = FindDoStart(clean_lines, linenum)
41994200
if do_found:
4200-
error(filename, linenum, 'readability/braces', 4,
4201+
error(filename, linenum, 'readability/dowhile', 4,
42014202
'while statement of do...while loop should be on a separate line to the closing brace')
42024203

42034204
def CheckTrailingSemicolon(filename, clean_lines, linenum, error):

0 commit comments

Comments
 (0)