-
Notifications
You must be signed in to change notification settings - Fork 16
/
.clang-format
72 lines (71 loc) · 2.17 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
BasedOnStyle: Google
Language: Cpp
Standard: Cpp11
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: false
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortLambdasOnASingleLine: Inline
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Allman
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AllowAllConstructorInitializersOnNextLine: true
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<itk'
Priority: 3
- Regex: '^<vtk'
Priority: 4
- Regex: '^<(dlg_|iA|mainwindow|mdichild)'
Priority: 2
- Regex: '^<Q'
Priority: 5
- Regex: '<[[:alnum:].]+>'
Priority: 6
- Regex: '.*'
Priority: 1
IndentCaseLabels: false
IndentWidth: 4
KeepEmptyLinesAtEOF: false
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: OuterScope
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PenaltyBreakAssignment: 10
PointerAlignment: Left
ReferenceAlignment: Left
DerivePointerAlignment: false
# PointerBindsToType: false # seems to be an old setting (clang < 4)
ReflowComments: false
SortIncludes: true
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
# not supported by clang 6.0:
# SpacesInConditionalStatement: false
# AllowAllArgumentsOnNextLine: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: ForContinuationAndIndentation
# existing pain points:
# - messes up Macro definition (TypedCallHelper - adds unwanted indentation)
# - breaks before each << symbol after the first (iALog.cpp -> AvailableLogLevels)
# - most changes currently: alignment of */& -> should we maybe use PointerAlignment:Middle ?