This repository has been archived by the owner on Oct 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
129 lines (94 loc) · 3.24 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#
# Copyright (c) 2022 Jamie Kenyon. All Rights Reserved.
# SPDX-License-Identifier: MIT.
#
Language: Cpp
# Access modifiers on the left.
AccessModifierOffset: -4
# Align escaped newlines as far left as possible.
AlignEscapedNewlinesLeft: true
# Align all trailing comments.
AlignTrailingComments: true
# Don't allow parameters to be placed on the next line, even though BinPackParameters is false.
AllowAllParametersOfDeclarationOnNextLine: false
# Do not allow short functions/if statements/loops on a single line.
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# Don't force breaks before multiline strings.
AlwaysBreakBeforeMultilineStrings: false
# Force breaks before template declarations.
AlwaysBreakTemplateDeclarations: 'Yes'
# Arguments and parameters are either on one line or on one line each.
BinPackArguments: false
BinPackParameters: false
# Do not break before binary operators.
BreakBeforeBinaryOperators: None
# Use the Allman brace breaking style: always on a new line..
BreakBeforeBraces: Allman
# Do not place ternary operators after line breaks.
BreakBeforeTernaryOperators: false
# Force columns to be less than 150 characters.
ColumnLimit: 150
# Constructor initializer all in one line or all on their own line.
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# Do not indent continuations.
ContinuationIndentWidth: 0
# Do not use braced lists in c++11 style.
Cpp11BracedListStyle: false
# Do not derive pointer alignment.
DerivePointerAlignment: false
# Order for which to sort included header files.
IncludeCategories:
- Regex: '^\".*'
Priority: -9000
- Regex: ' ^<.*'
Priority: -5000
- Regex: '^<.*\.h>'
Priority: -1000
- Regex: '.*'
Priority: -500
# Case labes are indented.
IndentCaseLabels: false
# Do not indent function declarations.
IndentFunctionDeclarationAfterType: false
# Indentation is 4 characters.
IndentWidth: 4
# Do not keep empty lines at start of blocks.
KeepEmptyLinesAtTheStartOfBlocks: false
# Keep at most 1 consecutive empty lines.
MaxEmptyLinesToKeep: 1
# Do not indent namespaces.
NamespaceIndentation: All
# Spaces for ObjC properties and protocol lists.
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
# Penalties.
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 100
PenaltyExcessCharacter: 20
# Force pointers to typename (i.e. char* a instead of char *a).
PointerAlignment: Left
# Ensure included header files are sorted:
SortIncludes: true
# Spaces after C-style casts and before assignments.
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
# Only space before parentheses if they are control statements.
SpaceBeforeParens: ControlStatements
# Single space before trailing comments.
SpacesBeforeTrailingComments: 1
# No spaces in parentheses, angles or square brackets.
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Use c++11 as the language standard.
Standard: Cpp11
# Tabs are 4 characters wide.
TabWidth: 4
# Don't use tabs for indentation.
UseTab: Never