From 19698283402f70591351f9ccd88457be84f6a520 Mon Sep 17 00:00:00 2001 From: Dirk Olbrich Date: Sun, 17 Sep 2023 12:00:31 +0200 Subject: [PATCH] clang-format: add style file --- .clang-format | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..674f02815f --- /dev/null +++ b/.clang-format @@ -0,0 +1,25 @@ +# We'll use defaults from the LLVM style, but with 4 columns indentation. +BasedOnStyle: LLVM +IndentWidth: 4 +--- +Language: Cpp +AllowShortBlocksOnASingleLine: Always +AllowShortEnumsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: OnlyFirstIf +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false +BraceWrapping: + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +IncludeBlocks: Regroup +InsertNewlineAtEOF: true +PackConstructorInitializers: CurrentLine +PenaltyReturnTypeOnItsOwnLine: 120 +PointerAlignment: Left +ReflowComments: false # keep licenze comment blocks +SortIncludes: CaseInsensitive +SpacesInLineCommentPrefix: + Maximum: 1 +TabWidth: 4