-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
54 lines (47 loc) · 1.33 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
# Common .clang-format for all board and production repos.
# You may refer to the style options from the official site:
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
# The important stuff:
BasedOnStyle: Google
UseTab: Always
IndentWidth: 4
TabWidth: 4
ColumnLimit: 120
# The not-so-important stuff:
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
BreakBeforeBinaryOperators: NonAssignment
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: false
PointerAlignment: Left
IndentPPDirectives: BeforeHash
MaxEmptyLinesToKeep: 2
ReflowComments: true
SpacesBeforeTrailingComments: 1
IncludeCategories:
# Standard headers.
- Regex: "<.+>"
Priority: 2
# Other headers.
- Regex: ".*"
Priority: 1
# C++ Specifics:
AccessModifierOffset: -4
AllowShortLambdasOnASingleLine: All
BreakConstructorInitializers: BeforeComma
FixNamespaceComments: true
# BreakBeforeConceptDeclarations: true
# IndentRequires: true
NamespaceIndentation: All
Standard: c++20