-
Notifications
You must be signed in to change notification settings - Fork 146
/
.clang-format
48 lines (42 loc) · 1.27 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
# Basic style rules by Charles Lohr
# Additions and modifications by Sam Ellicott
#
# For information about the definitions of rules
# See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Microsoft
AccessModifierOffset: -4
# Basic general rules
ColumnLimit: '120'
TabWidth: 4
UseTab: AlignWithSpaces
BreakBeforeBraces: Allman
PointerAlignment: Right
MaxEmptyLinesToKeep: 2
IndentCaseLabels: true
# Allignment rules
AlignAfterOpenBracket: DontAlign
AlignTrailingComments: false
AlignConsecutiveAssignments: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
# Rules for brackets/parentheses
SpaceInEmptyParentheses: false
SpacesInAngles: true
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: false
# Short statement rules
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortCaseLabelsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
# Other Rules
FixNamespaceComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakTemplateDeclarations: 'Yes'
BreakBeforeBinaryOperators: None
BreakConstructorInitializers: BeforeComma
ExperimentalAutoDetectBinPacking: false
NamespaceIndentation: None