-
Notifications
You must be signed in to change notification settings - Fork 3
/
.clang-format
47 lines (39 loc) · 1.07 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
# Use the Google style
BasedOnStyle: Google
# Align references to the left as in "int& foo"
PointerAlignment: Left
DerivePointerAlignment: false
# Align access modifiers to the left
AccessModifierOffset: -2
# Don't add indentation level for namespaces
NamespaceIndentation: Inner
# Sort includes by category and in alphabetical order inside category
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<[^.]*>$'
Priority: 1
- Regex: '^<.*>$'
Priority: 2
- Regex: '^".*"$'
Priority: 3
- Regex: '.*'
Priority: 4
SortIncludes: CaseSensitive
# Disable tabs
TabWidth: 2
UseTab: Never
# Set indentation
IndentWidth: 2
# Set line length
ColumnLimit: 100
# Imported from other projects
AlwaysBreakTemplateDeclarations: Yes
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
Cpp11BracedListStyle: true
AlignConsecutiveAssignments: None
AlignTrailingComments: true
SpaceAfterCStyleCast: true