-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path.clang-format
42 lines (41 loc) · 1.11 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- yaml -*-
# git ls-files -i -x '*.[ch]' | xargs clang-format -i
---
Language: Cpp
# BasedOnStyle: LLVM
# true would be better here. but it's bugged in combination with
# "PointerAlignment: Right" which we also use as is more important
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterDefinitionReturnType: true
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: false
ColumnLimit: 79
ForEachMacros:
- foreach
- forboth
- dlist_foreach
- dlist_foreach_modify
- slist_foreach
- slist_foreach_modify
IncludeBlocks: Preserve
IncludeCategories: # c.h and postgres.h should be first
- Regex: '.*'
Priority: 1
- Regex: '^<c\.h>'
Priority: -1
- Regex: '^<postgres\.h>'
Priority: -1
IndentCaseLabels: true
IndentWidth: 4
MacroBlockBegin: "PG_TRY();|PG_CATCH();"
MacroBlockEnd: "PG_END_TRY();"
MaxEmptyLinesToKeep: 3
PointerAlignment: Right
SpaceAfterCStyleCast: true
TabWidth: 4
UseTab: Always
...