From a034f4a6fc733360aa8343023c27b924f2575e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= Date: Sun, 5 May 2024 14:06:49 +0200 Subject: [PATCH] clang-format: Add file Related: apps/orage#32, xfce/xfce4-dev-tools!101 --- .clang-format | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..9bf078c --- /dev/null +++ b/.clang-format @@ -0,0 +1,32 @@ +--- +Language: Cpp +BasedOnStyle: LLVM + +AlignAfterOpenBracket: DontAlign +AlignEscapedNewlines: DontAlign +AlignOperands: Align +AlignTrailingComments: Never +AllowAllParametersOfDeclarationOnNextLine: false +AlwaysBreakAfterDefinitionReturnType: All +BreakBeforeBraces: Allman +ColumnLimit: 0 +ContinuationIndentWidth: 2 +Cpp11BracedListStyle: false +IndentCaseLabels: true +InsertNewlineAtEOF: true +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: 3 +SpaceBeforeParens: Always +TabWidth: 2 +UseTab: Always +# Buggy workaround to add exceptions to 'SpaceBeforeParens: Always' (see below) +WhitespaceSensitiveMacros: + - _ +# Workaround to avoid some alignment bugs when adding a macro to WhitespaceSensitiveMacros, +# see https://github.com/llvm/llvm-project/issues/55443#issuecomment-1953268337 +# This doesn't fix all alignment bugs though, so I'd rather make an exception only for '_', +# and not also for 'N_' or 'I_' for example. +# See also https://github.com/llvm/llvm-project/issues/82288 +Macros: + - _(x)=x +...