-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
74 lines (63 loc) · 1.81 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
74
---
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
Language: Cpp
BasedOnStyle: LLVM
# Set the maximum column limit to 80 (As per Epitech rules, think about clear code)
ColumnLimit: 79
# Use 4 spaces for indentation, no tabulations allowed
IndentWidth: 4
TabWidth: 4
UseTab: Never
# if
AllowShortIfStatementsOnASingleLine: false
PointerAlignment: Right
AlwaysBreakBeforeMultilineStrings: false
ContinuationIndentWidth: 4
# Alignment configurations
AlignAfterOpenBracket: DontAlign
AlignOperands: DontAlign
# AlignTrailingComments: True
AlignEscapedNewlines: DontAlign
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignConsecutiveBitFields: None
AlignConsecutiveMacros: None
# AlignConsecutiveShortCaseStatements: None
# Control space around certain language constructs
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceBeforeSquareBrackets: False
SpaceBeforeCpp11BracedList: False
SpaceInEmptyParentheses: False
SpacesInAngles: Never
SpacesInParentheses: False
SpacesInCStyleCastParentheses: False
# SpacesInConditionalStatements: True
# Indentation rules for C-Preprocessor directives to reflect their nesting level
IndentPPDirectives: BeforeHash
PPIndentWidth: 4
# Enforce newline at the end of files
InsertNewlineAtEOF: True
# Miscellaneous options
FixNamespaceComments: True
MaxEmptyLinesToKeep: 1
# bracket
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true