Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1294)

Unified Diff: Tools/Scripts/webkitpy/style/checkers/cpp.py

Issue 1184413003: Relax the braces style checker to allow either {} or { }. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Relax the {} check. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/style/checkers/cpp.py
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py
index 26df33fd75527a29bd943d0231bc65e4fe69dbd2..3b2b41665cf44f4d2b66d0bc148cdf78065b3b2f 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -2077,9 +2077,7 @@ def check_spacing(file_extension, clean_lines, line_number, error):
error(line_number, 'whitespace/braces', 5,
'Extra space before [')
- # There should always be a single space in between braces on the same line.
- if search(r'\{\}', line):
- error(line_number, 'whitespace/braces', 5, 'Missing space inside { }.')
+ # There should always be zero or one space in between braces on the same line.
if search(r'\{\s\s+\}', line):
error(line_number, 'whitespace/braces', 5, 'Too many spaces inside { }.')
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698