.clang-format 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: LLVM
  4. AccessModifierOffset: 0
  5. AlignAfterOpenBracket: Align
  6. AlignArrayOfStructures: None
  7. AlignConsecutiveAssignments:
  8. Enabled: false
  9. AcrossEmptyLines: false
  10. AcrossComments: false
  11. AlignCompound: false
  12. PadOperators: true
  13. AlignConsecutiveBitFields:
  14. Enabled: false
  15. AcrossEmptyLines: false
  16. AcrossComments: false
  17. AlignCompound: false
  18. PadOperators: false
  19. AlignConsecutiveDeclarations:
  20. Enabled: true
  21. AcrossEmptyLines: true
  22. AcrossComments: true
  23. AlignCompound: true
  24. PadOperators: true
  25. AlignConsecutiveMacros:
  26. Enabled: true
  27. AcrossEmptyLines: true
  28. AcrossComments: true
  29. AlignCompound: true
  30. PadOperators: true
  31. AlignEscapedNewlines: Right
  32. AlignOperands: Align
  33. AlignTrailingComments:
  34. Kind: Always
  35. OverEmptyLines: 0
  36. AllowAllArgumentsOnNextLine: true
  37. AllowAllParametersOfDeclarationOnNextLine: true
  38. AllowShortBlocksOnASingleLine: Never
  39. AllowShortCaseLabelsOnASingleLine: false
  40. AllowShortEnumsOnASingleLine: true
  41. AllowShortFunctionsOnASingleLine: Empty
  42. AllowShortIfStatementsOnASingleLine: Never
  43. AllowShortLambdasOnASingleLine: All
  44. AllowShortLoopsOnASingleLine: false
  45. AlwaysBreakAfterDefinitionReturnType: None
  46. AlwaysBreakAfterReturnType: None
  47. AlwaysBreakBeforeMultilineStrings: false
  48. AlwaysBreakTemplateDeclarations: MultiLine
  49. AttributeMacros:
  50. - __capability
  51. BinPackArguments: true
  52. BinPackParameters: true
  53. BitFieldColonSpacing: Both
  54. BraceWrapping:
  55. AfterCaseLabel: false
  56. AfterClass: false
  57. AfterControlStatement: Never
  58. AfterEnum: false
  59. AfterExternBlock: false
  60. AfterFunction: false
  61. AfterNamespace: false
  62. AfterObjCDeclaration: false
  63. AfterStruct: false
  64. AfterUnion: false
  65. BeforeCatch: false
  66. BeforeElse: false
  67. BeforeLambdaBody: false
  68. BeforeWhile: false
  69. IndentBraces: false
  70. SplitEmptyFunction: true
  71. SplitEmptyRecord: true
  72. SplitEmptyNamespace: true
  73. BreakAfterAttributes: Never
  74. BreakAfterJavaFieldAnnotations: false
  75. BreakArrays: true
  76. BreakBeforeBinaryOperators: None
  77. BreakBeforeConceptDeclarations: Always
  78. BreakBeforeBraces: Allman
  79. BreakBeforeInlineASMColon: OnlyMultiline
  80. BreakBeforeTernaryOperators: true
  81. BreakConstructorInitializers: BeforeColon
  82. BreakInheritanceList: BeforeColon
  83. BreakStringLiterals: true
  84. ColumnLimit: 100
  85. CommentPragmas: '^ IWYU pragma:'
  86. CompactNamespaces: false
  87. ConstructorInitializerIndentWidth: 4
  88. ContinuationIndentWidth: 4
  89. Cpp11BracedListStyle: true
  90. DerivePointerAlignment: false
  91. DisableFormat: false
  92. EmptyLineAfterAccessModifier: Never
  93. EmptyLineBeforeAccessModifier: Always
  94. ExperimentalAutoDetectBinPacking: false
  95. FixNamespaceComments: true
  96. ForEachMacros:
  97. - foreach
  98. - Q_FOREACH
  99. - BOOST_FOREACH
  100. IfMacros:
  101. - KJ_IF_MAYBE
  102. IncludeBlocks: Merge
  103. IncludeIsMainRegex: '(Test)?$'
  104. IncludeIsMainSourceRegex: ''
  105. IndentAccessModifiers: true
  106. IndentCaseBlocks: false
  107. IndentCaseLabels: true
  108. IndentExternBlock: AfterExternBlock
  109. IndentGotoLabels: true
  110. IndentPPDirectives: None
  111. IndentRequiresClause: true
  112. IndentWidth: 4
  113. IndentWrappedFunctionNames: false
  114. InsertBraces: false
  115. InsertNewlineAtEOF: true
  116. InsertTrailingCommas: None
  117. IntegerLiteralSeparator:
  118. Binary: 0
  119. BinaryMinDigits: 0
  120. Decimal: 0
  121. DecimalMinDigits: 0
  122. Hex: 0
  123. HexMinDigits: 0
  124. JavaScriptQuotes: Leave
  125. JavaScriptWrapImports: true
  126. KeepEmptyLinesAtTheStartOfBlocks: false
  127. LambdaBodyIndentation: Signature
  128. LineEnding: DeriveLF
  129. MacroBlockBegin: ''
  130. MacroBlockEnd: ''
  131. MaxEmptyLinesToKeep: 1
  132. NamespaceIndentation: All
  133. ObjCBinPackProtocolList: Auto
  134. ObjCBlockIndentWidth: 2
  135. ObjCBreakBeforeNestedBlockParam: true
  136. ObjCSpaceAfterProperty: false
  137. ObjCSpaceBeforeProtocolList: true
  138. PackConstructorInitializers: BinPack
  139. PenaltyBreakAssignment: 2
  140. PenaltyBreakBeforeFirstCallParameter: 19
  141. PenaltyBreakComment: 300
  142. PenaltyBreakFirstLessLess: 120
  143. PenaltyBreakOpenParenthesis: 0
  144. PenaltyBreakString: 1000
  145. PenaltyBreakTemplateDeclaration: 10
  146. PenaltyExcessCharacter: 1000000
  147. PenaltyIndentedWhitespace: 0
  148. PenaltyReturnTypeOnItsOwnLine: 60
  149. PointerAlignment: Left
  150. PPIndentWidth: 1
  151. QualifierAlignment: Left
  152. ReferenceAlignment: Pointer
  153. ReflowComments: true
  154. RemoveBracesLLVM: false
  155. RemoveSemicolon: false
  156. RequiresClausePosition: OwnLine
  157. RequiresExpressionIndentation: OuterScope
  158. SeparateDefinitionBlocks: Leave
  159. ShortNamespaceLines: 1
  160. SortIncludes: Never
  161. SortJavaStaticImport: Before
  162. SortUsingDeclarations: LexicographicNumeric
  163. SpaceAfterCStyleCast: false
  164. SpaceAfterLogicalNot: false
  165. SpaceAfterTemplateKeyword: true
  166. SpaceAroundPointerQualifiers: Default
  167. SpaceBeforeAssignmentOperators: true
  168. SpaceBeforeCaseColon: false
  169. SpaceBeforeCpp11BracedList: false
  170. SpaceBeforeCtorInitializerColon: true
  171. SpaceBeforeInheritanceColon: true
  172. SpaceBeforeParens: ControlStatements
  173. SpaceBeforeParensOptions:
  174. AfterControlStatements: true
  175. AfterForeachMacros: true
  176. AfterFunctionDefinitionName: false
  177. AfterFunctionDeclarationName: false
  178. AfterIfMacros: true
  179. AfterOverloadedOperator: false
  180. AfterRequiresInClause: false
  181. AfterRequiresInExpression: false
  182. BeforeNonEmptyParentheses: false
  183. SpaceBeforeRangeBasedForLoopColon: true
  184. SpaceBeforeSquareBrackets: false
  185. SpaceInEmptyBlock: false
  186. SpacesBeforeTrailingComments: 1
  187. SpacesInAngles: Never
  188. SpacesInContainerLiterals: true
  189. SpacesInLineCommentPrefix:
  190. Minimum: 1
  191. Maximum: -1
  192. SpacesInSquareBrackets: false
  193. Standard: Latest
  194. StatementAttributeLikeMacros:
  195. - Q_EMIT
  196. StatementMacros:
  197. - Q_UNUSED
  198. - QT_REQUIRE_VERSION
  199. TabWidth: 4
  200. UseTab: Never
  201. WhitespaceSensitiveMacros:
  202. - BOOST_PP_STRINGIZE
  203. - CF_SWIFT_NAME
  204. - NS_SWIFT_NAME
  205. - PP_STRINGIZE
  206. - STRINGIZE
  207. ...