From: Giuliano Procida Date: Mon, 11 Oct 2021 13:17:09 +0000 (+0100) Subject: Tweak clang-format configuration X-Git-Tag: libabigail-2.1~174 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=af9b4c146c689f6de34d79b379534b8987b9c18c;p=libabigail.git Tweak clang-format configuration These are the updates: AlignConsecutiveDeclarations: false - the dominant style in libabigail is not to align AllowShortBlocksOnASingleLine: Always AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: All AllowShortLambdasOnASingleLine: All - the libabigail style favours short things on a single line Cpp11BracedListStyle: true - this seems to improve some initialiser syntax BinPackArguments: false - we already turn this off for parameters SpaceAfterCStyleCast: true - this is the libabigail style * .clang-format: Various tweaks to Clang format configuration. Signed-off-by: Giuliano Procida --- diff --git a/.clang-format b/.clang-format index 1b422dfb..d09d739a 100644 --- a/.clang-format +++ b/.clang-format @@ -2,17 +2,24 @@ --- BasedOnStyle: GNU Standard: c++11 -AlignConsecutiveDeclarations: true +AlignConsecutiveDeclarations: false +AllowShortBlocksOnASingleLine: Always +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortLambdasOnASingleLine: All AlwaysBreakAfterReturnType: All BreakConstructorInitializers: BeforeColon ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 +Cpp11BracedListStyle: true IndentWidth: 2 AlignAfterOpenBracket: Align +BinPackArguments: false BinPackParameters: false BreakStringLiterals: false PointerAlignment: Left SortUsingDeclarations: false +SpaceAfterCStyleCast: true SpaceBeforeParens: ControlStatements TabWidth: 8 UseTab: Always