diff --git a/scripts/cpplint.py b/scripts/cpplint.py index 2e8a5582842..c412f983219 100755 --- a/scripts/cpplint.py +++ b/scripts/cpplint.py @@ -220,20 +220,21 @@ 'readability/casting', 'readability/check', 'readability/constructors', + 'readability/dowhile', 'readability/fn_size', + 'readability/function_comment' + 'readability/identifier_spacing', + 'readability/identifiers', 'readability/inheritance', 'readability/multiline_comment', 'readability/multiline_string', - 'readability/identifier_spacing', - 'readability/identifiers', 'readability/namespace', 'readability/nolint', 'readability/nul', 'readability/strings', - 'readability/todo', 'readability/throw', + 'readability/todo', 'readability/utf8', - 'readability/function_comment' 'runtime/arrays', 'runtime/casting', 'runtime/endl', @@ -282,7 +283,7 @@ # flag. By default all errors are on, so only add here categories that should be # off by default (i.e., categories that must be enabled by the --filter= flags). # All entries here should start with a '-' or '+', as in the --filter= flag. -_DEFAULT_FILTERS = ['-build/include_alpha'] +_DEFAULT_FILTERS = ['-build/include_alpha', '-readability/dowhile'] # The default list of categories suppressed for C (not C++) files. _DEFAULT_C_SUPPRESSED_CATEGORIES = [ @@ -4197,7 +4198,7 @@ def CheckDoWhile(filename, clean_lines, linenum, error): if Search(r'}\s*while\s*\(', line): do_found, num = FindDoStart(clean_lines, linenum) if do_found: - error(filename, linenum, 'readability/braces', 4, + error(filename, linenum, 'readability/dowhile', 4, 'while statement of do...while loop should be on a separate line to the closing brace') def CheckTrailingSemicolon(filename, clean_lines, linenum, error):