forked from sellicott/tcc-riscv32
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.clang-format
45 lines (40 loc) · 1.2 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
# Basic style rules by Charles Lohr
BasedOnStyle: Microsoft
AccessModifierOffset: -4
AlwaysBreakTemplateDeclarations: 'Yes'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Stroustrup
BreakConstructorInitializers: BeforeComma
ColumnLimit: '100'
ExperimentalAutoDetectBinPacking: 'false'
MaxEmptyLinesToKeep: 2
PointerAlignment: Right
# Options for spaces around parentheses
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'true'
SpacesInContainerLiterals: 'true'
SpacesInSquareBrackets: 'true'
SpacesInParentheses: 'true'
SpacesInConditionalStatement: 'true'
SpaceBeforeParens: Never
# Indentation Rules
TabWidth: '4'
UseTab: Never
FixNamespaceComments: 'true'
IndentCaseLabels: 'true'
NamespaceIndentation: None
# Alignment Rules
AlignAfterOpenBracket: DontAlign
AlignOperands: AlignAfterOperator
AlignConsecutiveAssignments: false
AlignConsecutiveMacros: false
AlignTrailingComments: false
AlignEscapedNewlines: Left
# Single Line rules
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: Never
AllowShortFunctionsOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortLoopsOnASingleLine: true