Skip to content
Snippets Groups Projects
Commit 5b7d070e authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

clang-format: Add file

Related: orage#32, xfce/xfce4-dev-tools!101
parent e89fd941
No related branches found
No related tags found
1 merge request!51Add .clang-format file and format code
---
Language: Cpp
BasedOnStyle: LLVM
AlignEscapedNewlines: DontAlign
AlignTrailingComments: Never
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterReturnType: All
BreakBeforeBinaryOperators: NonAssignment
ColumnLimit: 0
Cpp11BracedListStyle: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '"config\.h"'
Priority: -3
CaseSensitive: true
- Regex: '<.*>'
Priority: -2
CaseSensitive: true
- Regex: '".*/.*"'
Priority: -1
CaseSensitive: true
- Regex: '"[^/]*"'
Priority: 0
SortPriority: 1
CaseSensitive: true
IndentCaseLabels: true
IndentWidth: 4
InsertNewlineAtEOF: true
MaxEmptyLinesToKeep: 3
SpaceAfterCStyleCast: true
SpaceBeforeParens: Always
WhitespaceSensitiveMacros:
# Buggy workaround to add exceptions to 'SpaceBeforeParens: Always' (see below)
- _
# 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
...
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment