cilium
/
.clang-format
180 строк · 7.6 Кб
1# Configuration file for clang-format.
2# Intended for clang-format >= 15.
3#
4# The list and meaning of the options is available at:
5#
6# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
7---
8# BasedOnStyle # No base style in use
9# AccessModifierOffset # We don't use access modifiers
10AlignAfterOpenBracket: Align
11AlignArrayOfStructures: Left
12AlignConsecutiveAssignments: false
13AlignConsecutiveBitFields:
14Enabled: true
15AcrossEmptyLines: true
16AcrossComments: true
17AlignConsecutiveDeclarations: false
18AlignConsecutiveMacros:
19Enabled: true
20AcrossEmptyLines: true
21AcrossComments: true
22AlignEscapedNewlines: Left
23AlignOperands: true
24AlignTrailingComments: true
25AllowAllArgumentsOnNextLine: false
26# AllowAllConstructorInitializersOnNextLine # Deprecated
27AllowAllParametersOfDeclarationOnNextLine: false
28AllowShortBlocksOnASingleLine: Never
29AllowShortCaseLabelsOnASingleLine: false
30AllowShortEnumsOnASingleLine: false
31AllowShortFunctionsOnASingleLine: None
32AllowShortIfStatementsOnASingleLine: Never
33# AllowShortLambdasOnASingleLine # We don't use lambdas
34AllowShortLoopsOnASingleLine: false
35# AlwaysBreakAfterDefinitionReturnType # Deprecated
36AlwaysBreakAfterReturnType: None
37AlwaysBreakBeforeMultilineStrings: false
38# AlwaysBreakTemplateDeclarations # We don't use templates
39# AttributeMacros # Unused at this time
40BinPackArguments: true
41BinPackParameters: true
42BitFieldColonSpacing: None
43BraceWrapping:
44AfterCaseLabel: true
45# AfterClass # We don't use classes
46AfterControlStatement: Never
47AfterEnum: false
48AfterFunction: true
49# AfterNamespace # We don't use namespaces
50# AfterObjCDeclaration # We don't use ObjC
51AfterStruct: false
52AfterUnion: false
53AfterExternBlock: false
54# BeforeCatch # We don't use try/catch
55BeforeElse: false
56# BeforeLambdaBody # We don't use lambdas
57BeforeWhile: false
58IndentBraces: false
59SplitEmptyFunction: true
60SplitEmptyRecord: true
61# SplitEmptyNamespace # We don't use namespaces
62# BreakAfterJavaFieldAnnotations # We don't use Java
63BreakBeforeBinaryOperators: None
64BreakBeforeBraces: Custom
65# BreakBeforeConceptDeclarations # We don't use concepts
66BreakBeforeTernaryOperators: false
67# BreakConstructorInitializers # We don't use constructors
68# BreakInheritanceList # We don't use inheritance
69BreakStringLiterals: false
70ColumnLimit: 80
71# CommentPragmas # Unused at this time
72# CompactNamespaces # We don't use namespaces
73# ConstructorInitializerAllOnOneLineOrOnePerLine # Deprecated
74# ConstructorInitializerIndentWidth # We don't use constructors
75ContinuationIndentWidth: 8
76Cpp11BracedListStyle: false
77# DeriveLineEnding # Deprecated
78DerivePointerAlignment: false
79DisableFormat: false
80# EmptyLineAfterAccessModifier # We don't use access modifiers
81# EmptyLineBeforeAccessModifier # We don't use access modifiers
82# ExperimentalAutoDetectBinPacking # Experimental, "Use at your own risk"
83# FixNamespaceComments # We don't use namespaces
84# ForEachMacros # Unused at this time
85# IfMacros # Unused at this time
86IncludeBlocks: Preserve
87# IncludeCategories # Unused at this time
88# IncludeIsMainRegex # Unused at this time
89# IncludeIsMainSourceRegex # Unused at this time
90# IndentAccessModifiers # We don't use access modifiers
91IndentCaseBlocks: false
92IndentCaseLabels: false
93# IndentExternBlock # We don't use extern blocks
94IndentGotoLabels: false
95IndentPPDirectives: AfterHash
96# IndentRequiresClause # We don't use equire clauses
97IndentWidth: 8
98IndentWrappedFunctionNames: false
99InsertBraces: false
100# InsertTrailingCommas # We don't use JavaScript
101# JavaImportGroups # We don't use Java
102# JavaScriptQuotes # We don't use JavaScript
103# JavaScriptWrapImports # We don't use JavaScript
104KeepEmptyLinesAtTheStartOfBlocks: false
105# LambdaBodyIndentation # We don't use lambdas
106Language: Cpp
107# MacroBlockBegin # Unused at this time
108# MacroBlockEnd # Unused at this time
109MaxEmptyLinesToKeep: 1
110# NamespaceIndentation # We don't use namespaces
111# NamespaceMacros # We don't use namespaces
112# ObjCBinPackProtocolList # We don't use ObjC
113# ObjCBlockIndentWidth # We don't use ObjC
114# ObjCBreakBeforeNestedBlockParam # We don't use ObjC
115# ObjCSpaceAfterProperty # We don't use ObjC
116# ObjCSpaceBeforeProtocolList # We don't use ObjC
117PPIndentWidth: 1
118# PackConstructorInitializers # We don't use constructors
119
120# Penalties decide in what order (weighting) things should be done if a line is
121# too long: 100 = try everything else before this.
122# See https://stackoverflow.com/a/46749925
123PenaltyBreakAssignment: 10
124PenaltyBreakBeforeFirstCallParameter: 0
125PenaltyBreakComment: 0
126PenaltyBreakFirstLessLess: 0
127PenaltyBreakOpenParenthesis: 100
128PenaltyBreakString: 10
129# PenaltyBreakTemplateDeclaration # We don't use templates
130PenaltyExcessCharacter: 100
131PenaltyIndentedWhitespace: 100
132PenaltyReturnTypeOnItsOwnLine: 100
133
134PointerAlignment: Right
135QualifierAlignment: Leave
136# QualifierOrder # Unused at this time
137# RawStringFormats # Unused at this time
138# ReferenceAlignment # We don't use references
139ReflowComments: false
140RemoveBracesLLVM: false
141# RequiresClausePosition # We don't use require clauses
142SeparateDefinitionBlocks: Leave
143# ShortNamespaceLines # We don't use namespaces
144SortIncludes: Never
145# SortJavaStaticImport # We don't use Java
146# SortUsingDeclarations # We don't use using declarations
147SpaceAfterCStyleCast: false
148SpaceAfterLogicalNot: false
149# SpaceAfterTemplateKeyword # We don't use templates
150SpaceAroundPointerQualifiers: Default
151SpaceBeforeAssignmentOperators: true
152SpaceBeforeCaseColon: false
153# SpaceBeforeCpp11BracedList # We don't use C++11 braced lists to initialize objects
154# SpaceBeforeCtorInitializerColon # We don't use constructors
155# SpaceBeforeInheritanceColon # We don't use inheritance
156SpaceBeforeParens: ControlStatements
157# SpaceBeforeParensOptions # No need for custom SpaceBeforeParens options
158# SpaceBeforeRangeBasedForLoopColon # We don't use range-based for loops
159SpaceBeforeSquareBrackets: false
160SpaceInEmptyBlock: false
161SpaceInEmptyParentheses: false
162SpacesBeforeTrailingComments: 1
163# SpacesInAngles # We don't use templates
164SpacesInCStyleCastParentheses: false
165SpacesInConditionalStatement: false
166SpacesInContainerLiterals: false
167SpacesInLineCommentPrefix:
168Minimum: 1
169Maximum: 1
170SpacesInParentheses: false
171SpacesInSquareBrackets: false
172Standard: C++03
173# StatementAttributeLikeMacros # Unused at this time
174# StatementMacros # Unused at this time
175TabWidth: 8
176# TypenameMacros # Unused at this time
177# UseCRLF # Deprecated
178UseTab: Always
179# WhitespaceSensitiveMacros # Unused at this time
180...
181