Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,13 @@
"Remove space before ( in switch (": "s/switch (/switch(/",
"Should have a space between // and comment": 's/\/\//\/\/ /',
"Missing space before {": r's/\([^ ]\){/\1 {/',
"Tab found, replace by spaces": r's/\t/ /',
"Tab found, replace by spaces": r's/\t/ /g',
"Line ends in whitespace. Consider deleting these extra spaces.": r's/\s*$//',
#"Redundant blank line at the end of a code block should be deleted.": "d", # messes up line numbers for other errors.
"You don't need a ; after a }": r's/};/}/',
"Missing space after ,": r's/,\([^ ]\)/, \1/g',
# "Statement after an if should be on a new line": r's/^\(\s*\)if *\(([^()]*)\) *\(.*\)$/\1if\2\n\1 \3/', # Single layer of nested bracets
# "Statement after an if should be on a new line": r's/^\(\s*\)if *\((\([^()]\|([^()]*)\)*)\) *\(.*\)$/\1if\2\n\1 \4/', # Max 2 layers of nested bracets; messes up line numbers for other errors.
# "Redundant blank line at the end of a code block should be deleted.": "d", # messes up line numbers for other errors.
}

_regexp_compile_cache = {}
Expand Down