From ec13839c92975dae4d52ad0d5973466a38625ef2 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 10 Sep 2019 12:31:36 -0500 Subject: [PATCH] Modify clang-format config to avoid single-line things. NFC. --- .clang-format | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.clang-format b/.clang-format index 30c11aa..5cb786f 100644 --- a/.clang-format +++ b/.clang-format @@ -10,22 +10,19 @@ ColumnLimit: 100 # Based on minimizing diff when applying clang-format AccessModifierOffset: -4 -DerivePointerAlignment: true AlignConsecutiveAssignments: true -FixNamespaceComments: true -NamespaceIndentation: Inner -AllowShortLoopsOnASingleLine: true -AlwaysBreakTemplateDeclarations: Yes # MultiLine -SpaceAfterTemplateKeyword: false -MaxEmptyLinesToKeep: 2 -IndentPPDirectives: AfterHash AlignEscapedNewlines: DontAlign -BreakConstructorInitializers: BeforeColon +AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: true - -# This one is mixed in its effect: it permits some single-line functions, -# but also tends to put, e.g., enums on a single line. -AllowShortBlocksOnASingleLine: true +AllowShortLoopsOnASingleLine: false +AlwaysBreakTemplateDeclarations: Yes # MultiLine +BreakConstructorInitializers: BeforeColon +DerivePointerAlignment: true +FixNamespaceComments: true +IndentPPDirectives: AfterHash +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: Inner +SpaceAfterTemplateKeyword: false # No way to remove all space around operators as seen in much of the code I looked at. #SpaceBeforeAssignmentOperators: false @@ -41,3 +38,4 @@ SortUsingDeclarations: false # Hard to tell what the desired config here was. # AllowShortFunctionsOnASingleLine: Inline +AllowShortFunctionsOnASingleLine: None