-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
72 lines (72 loc) · 2.28 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
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignTrailingComments: true
AlignEscapedNewlines: Left
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: true
ColumnLimit: 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DisableFormat: false
FixNamespaceComments: false # we do not allow such comments
ForEachMacros:
# funny name, but this makes CppUTest code formatted reasonably well
- 'TEST_GROUP'
- 'TEST_GROUP_BASE'
- 'TEST'
- 'TEST_BASE'
- 'IGNORE_TEST'
IncludeBlocks: Regroup
IncludeCategories:
# cpputest (TestHarness.h must be the first)
- Regex: '^["<]CppUTest/TestHarness.h'
Priority: -2
- Regex: '^["<]CppUTest(Ext)?/'
Priority: -1
# glibc headers:
- Regex: '^<sys/'
Priority: 1
# C/C++ standard library headers:
- Regex: "^<([^\\.]+|std[a-z]+\\.h|(assert|complex|ctype|errno|fenv|float|inttypes|\
iso646|limits|locale|math|setjmp|signal|string|tgmath|threads|time|uchar|\
wchar|wctype)\\.h)>"
Priority: 2
- Regex: '^<'
Priority: 3
- Regex: '^"'
Priority: 4
IndentCaseLabels: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyReturnTypeOnItsOwnLine: 5000
PointerAlignment: Left
ReflowComments: false # it screws up long comments that indicate 'tables'
SortIncludes: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
Standard: Auto
TabWidth: 4
UseTab: Never