-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy path.clang-format
More file actions
68 lines (64 loc) · 1.83 KB
/
.clang-format
File metadata and controls
68 lines (64 loc) · 1.83 KB
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
# Re-adapted from: https://gist.github.com/JPHutchins/6ef33a52cc92fc4a71996b32b11724b4
# clang-format doc: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Google
AlignAfterOpenBracket: BlockIndent
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: MultiLine
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyNamespace: false
SplitEmptyRecord: false
BitFieldColonSpacing: After
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakStringLiterals: true
ColumnLimit: 79
DerivePointerAlignment: false
IndentCaseBlocks: true
IndentCaseLabels: true
IndentWidth: 4
MaxEmptyLinesToKeep: 2
PointerAlignment: Right
SortIncludes: false
SpaceBeforeParens: ControlStatementsExceptControlMacros
UseTab: Never
# Force fun return type and fun definition to stay on 2 different lines:
# static int
# foo() {
# printf();
# }
AlwaysBreakAfterReturnType: TopLevelDefinitions
# Prevents:
# foo =
# Bar(...)
PenaltyBreakAssignment: 400
PenaltyBreakBeforeFirstCallParameter: 0
# Handle macros with no `;` at EOL, so that they don't include the next line
# into them.
StatementMacros:
- Py_BEGIN_ALLOW_THREADS
- Py_END_ALLOW_THREADS