Update clang-format matching more of Chromium
authorWeiliang Chen <weiliangc@chromium.org>
Tue, 22 May 2018 13:03:43 +0000 (09:03 -0400)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 23 May 2018 18:04:41 +0000 (18:04 +0000)
This CL does one thing: disallow short if/loop becoming a single
line.

Skia style guide prefers to always have braces. Though always
have braces isn't achievable by clang-format, always breaking into
multiple lines can be set.

Bug: skia:
Change-Id: I70b504dea01b4c916901ea2247ac0e052d468051
Reviewed-on: https://skia-review.googlesource.com/128688
Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
.clang-format

index 90eedd8b8fefcfb6fbf1da52b440e978128b0617..6e9702e660fc75419d2fe8642abd23512394291e 100644 (file)
@@ -20,8 +20,8 @@ AllowAllParametersOfDeclarationOnNextLine: true
 AllowShortBlocksOnASingleLine: false
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: All
-AllowShortIfStatementsOnASingleLine: true
-AllowShortLoopsOnASingleLine: true
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterDefinitionReturnType: None
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: true