-
-
Notifications
You must be signed in to change notification settings - Fork 492
/
.clang-format
73 lines (55 loc) · 1.74 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
73
# Based on LLVM coding standards
BasedOnStyle: LLVM
# Use 4 spaces for indentation
IndentWidth: 4
# Use 4 spaces for continuations
ContinuationIndentWidth: 4
# Allow short functions to be on a single line
AllowShortFunctionsOnASingleLine: false
# Column limit for wrapping
ColumnLimit: 0
# Break before braces for functions and classes
BreakBeforeBraces: Allman
# Function declaration return type alignment
AlignTrailingComments: true
AlignAfterOpenBracket: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
# Control statements
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
IndentCaseLabels: true
# Pointer alignment
PointerAlignment: Left
# Space before and after operators
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpacesBeforeTrailingComments: 1
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
# Namespace indentation
NamespaceIndentation: None
# Empty line before access modifiers in classes
EmptyLineBeforeAccessModifier: LogicalBlock
# Add space between statements
SpaceBeforeAssignmentOperators: true
# No space before opening brackets
SpaceBeforeSquareBrackets: false
# No space before or after '<' and '>' in template argument lists
SpacesInAngles: false
# Handling include statements
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^".*\.h"'
Priority: 2
# Keep empty lines at the start of blocks
KeepEmptyLinesAtTheStartOfBlocks: true
# Indentation style for preprocessor directives
IndentPPDirectives: AfterHash
# Wrap comments to fit within column limit
ReflowComments: false