-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-format
53 lines (43 loc) · 1.37 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
---
Language: Cpp
Standard: Latest
BasedOnStyle: LLVM
DisableFormat: false
# 80-column limit and 4-space indent width
AccessModifierOffset: -4
ColumnLimit: 80
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
IndentWidth: 4
# do not use tabs or carriage returns
DeriveLineEnding: false
UseCRLF: false
UseTab: Never
# indent preprocessor directives just like code
IndentPPDirectives: BeforeHash
PPIndentWidth: -1
# allow up to two empty lines to separate sections
EmptyLineAfterAccessModifier: Leave
EmptyLineBeforeAccessModifier: Leave
MaxEmptyLinesToKeep: 2
# always allow short blocks on single lines
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
# insert spaces into C-style casts, e.g., (int) x
SpaceAfterCStyleCast: true
# put closing parenthesis on own line for long function calls
AlignAfterOpenBracket: BlockIndent
# put each argument of a long function call on its own line
BinPackArguments: false
BinPackParameters: false
# offset constructor initializer lists using colons and commas
# at the beginning of each line
BreakConstructorInitializers: BeforeComma
# always put template <...> on its own line
AlwaysBreakTemplateDeclarations: Yes
...