1+ ---
2+ # YAMS C++ Code Style
3+ # Based on LLVM style with modifications
4+
5+ BasedOnStyle : LLVM
6+ Language : Cpp
7+ Standard : c++20
8+
9+ # Indentation
10+ IndentWidth : 4
11+ TabWidth : 4
12+ UseTab : Never
13+ IndentCaseLabels : true
14+ IndentCaseBlocks : false
15+ NamespaceIndentation : None
16+ IndentPPDirectives : None
17+ IndentExternBlock : AfterExternBlock
18+ IndentGotoLabels : true
19+
20+ # Line Length
21+ ColumnLimit : 100
22+
23+ # Braces
24+ BreakBeforeBraces : Attach
25+ BraceWrapping :
26+ AfterCaseLabel : false
27+ AfterClass : false
28+ AfterControlStatement : Never
29+ AfterEnum : false
30+ AfterFunction : false
31+ AfterNamespace : false
32+ AfterStruct : false
33+ AfterUnion : false
34+ AfterExternBlock : true
35+ BeforeCatch : false
36+ BeforeElse : false
37+ BeforeLambdaBody : false
38+ BeforeWhile : false
39+ IndentBraces : false
40+ SplitEmptyFunction : true
41+ SplitEmptyRecord : true
42+ SplitEmptyNamespace : true
43+
44+ # Alignment
45+ AlignAfterOpenBracket : Align
46+ AlignArrayOfStructures : None
47+ AlignConsecutiveAssignments : None
48+ AlignConsecutiveBitFields : None
49+ AlignConsecutiveDeclarations : None
50+ AlignConsecutiveMacros : None
51+ AlignEscapedNewlines : Right
52+ AlignOperands : Align
53+ AlignTrailingComments : true
54+
55+ # Line Breaking
56+ AllowAllArgumentsOnNextLine : true
57+ AllowAllParametersOfDeclarationOnNextLine : true
58+ AllowShortBlocksOnASingleLine : Never
59+ AllowShortCaseLabelsOnASingleLine : false
60+ AllowShortEnumsOnASingleLine : true
61+ AllowShortFunctionsOnASingleLine : Inline
62+ AllowShortIfStatementsOnASingleLine : Never
63+ AllowShortLambdasOnASingleLine : All
64+ AllowShortLoopsOnASingleLine : false
65+ AlwaysBreakAfterReturnType : None
66+ AlwaysBreakBeforeMultilineStrings : false
67+ AlwaysBreakTemplateDeclarations : MultiLine
68+ BinPackArguments : true
69+ BinPackParameters : true
70+ BreakBeforeBinaryOperators : None
71+ BreakBeforeConceptDeclarations : true
72+ BreakBeforeTernaryOperators : true
73+ BreakConstructorInitializers : BeforeColon
74+ BreakInheritanceList : BeforeColon
75+ BreakStringLiterals : true
76+
77+ # Spaces
78+ SpaceAfterCStyleCast : false
79+ SpaceAfterLogicalNot : false
80+ SpaceAfterTemplateKeyword : true
81+ SpaceAroundPointerQualifiers : Default
82+ SpaceBeforeAssignmentOperators : true
83+ SpaceBeforeCaseColon : false
84+ SpaceBeforeCpp11BracedList : false
85+ SpaceBeforeCtorInitializerColon : true
86+ SpaceBeforeInheritanceColon : true
87+ SpaceBeforeParens : ControlStatements
88+ SpaceBeforeRangeBasedForLoopColon : true
89+ SpaceBeforeSquareBrackets : false
90+ SpaceInEmptyBlock : false
91+ SpaceInEmptyParentheses : false
92+ SpacesBeforeTrailingComments : 1
93+ SpacesInAngles : Never
94+ SpacesInCStyleCastParentheses : false
95+ SpacesInConditionalStatement : false
96+ SpacesInContainerLiterals : false
97+ SpacesInParentheses : false
98+ SpacesInSquareBrackets : false
99+
100+ # Other
101+ AccessModifierOffset : -4
102+ CompactNamespaces : false
103+ ConstructorInitializerIndentWidth : 4
104+ ContinuationIndentWidth : 4
105+ Cpp11BracedListStyle : true
106+ DerivePointerAlignment : false
107+ DisableFormat : false
108+ EmptyLineAfterAccessModifier : Never
109+ EmptyLineBeforeAccessModifier : LogicalBlock
110+ FixNamespaceComments : true
111+ IncludeBlocks : Preserve
112+ IndentRequires : false
113+ IndentWrappedFunctionNames : false
114+ InsertBraces : false
115+ InsertTrailingCommas : None
116+ KeepEmptyLinesAtTheStartOfBlocks : false
117+ LambdaBodyIndentation : Signature
118+ MaxEmptyLinesToKeep : 1
119+ PointerAlignment : Left
120+ QualifierAlignment : Leave
121+ ReferenceAlignment : Pointer
122+ ReflowComments : true
123+ RemoveBracesLLVM : false
124+ RequiresClausePosition : OwnLine
125+ SeparateDefinitionBlocks : Leave
126+ ShortNamespaceLines : 1
127+ SortIncludes : CaseInsensitive
128+ SortUsingDeclarations : true
129+
130+ # Penalties (for line breaking decisions)
131+ PenaltyBreakAssignment : 2
132+ PenaltyBreakBeforeFirstCallParameter : 19
133+ PenaltyBreakComment : 300
134+ PenaltyBreakFirstLessLess : 120
135+ PenaltyBreakOpenParenthesis : 0
136+ PenaltyBreakString : 1000
137+ PenaltyBreakTemplateDeclaration : 10
138+ PenaltyExcessCharacter : 1000000
139+ PenaltyIndentedWhitespace : 0
140+ PenaltyReturnTypeOnItsOwnLine : 60
141+
142+ # Include Categories
143+ IncludeCategories :
144+ - Regex : ' ^"yams/'
145+ Priority : 1
146+ SortPriority : 1
147+ - Regex : ' ^<tracy/'
148+ Priority : 2
149+ SortPriority : 2
150+ - Regex : ' ^<(sqlite3|sqlite_vec)'
151+ Priority : 3
152+ SortPriority : 3
153+ - Regex : ' ^<(spdlog|nlohmann|CLI11|magic_enum|toml|onnxruntime)'
154+ Priority : 4
155+ SortPriority : 4
156+ - Regex : ' ^<[^/]+>'
157+ Priority : 5
158+ SortPriority : 5
159+ - Regex : ' .*'
160+ Priority : 6
161+ SortPriority : 6
162+
163+ # Macros
164+ AttributeMacros :
165+ - __capability
166+ ForEachMacros :
167+ - foreach
168+ - Q_FOREACH
169+ - BOOST_FOREACH
170+ IfMacros :
171+ - KJ_IF_MAYBE
172+ MacroBlockBegin : ' '
173+ MacroBlockEnd : ' '
174+ StatementAttributeLikeMacros :
175+ - Q_EMIT
176+ StatementMacros :
177+ - Q_UNUSED
178+ - QT_REQUIRE_VERSION
179+ WhitespaceSensitiveMacros :
180+ - STRINGIZE
181+ - PP_STRINGIZE
182+ - BOOST_PP_STRINGIZE
183+ - NS_SWIFT_NAME
184+ - CF_SWIFT_NAME
0 commit comments