You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/cpplint.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -552,7 +552,9 @@
552
552
"Missing space before {": r's/\([^ ]\){/\1 {/',
553
553
"Tab found, replace by spaces": r's/\t/ /',
554
554
"Line ends in whitespace. Consider deleting these extra spaces.": r's/\s*$//',
555
-
#"Redundant blank line at the end of a code block should be deleted.": "d", # messes up line numbers for other errors.
555
+
# "Statement after an if should be on a new line": r's/^\(\s*\)if *\(([^()]*)\) *\(.*\)$/\1if\2\n\1 \3/', # Single layer of nested bracets
556
+
# "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.
557
+
# "Redundant blank line at the end of a code block should be deleted.": "d", # messes up line numbers for other errors.
0 commit comments