.clang-format 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: LLVM
  4. AccessModifierOffset: -2
  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: false
  21. AcrossEmptyLines: false
  22. AcrossComments: false
  23. AlignCompound: false
  24. PadOperators: false
  25. AlignConsecutiveMacros:
  26. Enabled: false
  27. AcrossEmptyLines: false
  28. AcrossComments: false
  29. AlignCompound: false
  30. PadOperators: false
  31. AlignEscapedNewlines: Right
  32. AlignOperands: Align
  33. AlignTrailingComments:
  34. Kind: Always
  35. OverEmptyLines: 0
  36. AllowAllArgumentsOnNextLine: true
  37. AllowAllParametersOfDeclarationOnNextLine: true
  38. AllowShortBlocksOnASingleLine: Empty
  39. AllowShortCaseLabelsOnASingleLine: true
  40. AllowShortEnumsOnASingleLine: false
  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: Attach
  79. BreakBeforeInlineASMColon: OnlyMultiline
  80. BreakBeforeTernaryOperators: true
  81. BreakConstructorInitializers: AfterColon
  82. BreakInheritanceList: BeforeColon
  83. BreakStringLiterals: false
  84. ColumnLimit: 120
  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: LogicalBlock
  94. ExperimentalAutoDetectBinPacking: false
  95. FixNamespaceComments: true
  96. ForEachMacros:
  97. - foreach
  98. - Q_FOREACH
  99. - BOOST_FOREACH
  100. IfMacros:
  101. - KJ_IF_MAYBE
  102. IncludeBlocks: Preserve
  103. IncludeCategories:
  104. - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
  105. Priority: 2
  106. SortPriority: 0
  107. CaseSensitive: false
  108. - Regex: '^(<|"(gtest|gmock|isl|json)/)'
  109. Priority: 3
  110. SortPriority: 0
  111. CaseSensitive: false
  112. - Regex: '.*'
  113. Priority: 1
  114. SortPriority: 0
  115. CaseSensitive: false
  116. IncludeIsMainRegex: '(Test)?$'
  117. IncludeIsMainSourceRegex: ''
  118. IndentAccessModifiers: false
  119. IndentCaseBlocks: false
  120. IndentCaseLabels: true
  121. IndentExternBlock: AfterExternBlock
  122. IndentGotoLabels: true
  123. IndentPPDirectives: None
  124. IndentRequiresClause: true
  125. IndentWidth: 4
  126. IndentWrappedFunctionNames: false
  127. InsertBraces: false
  128. InsertNewlineAtEOF: false
  129. InsertTrailingCommas: None
  130. IntegerLiteralSeparator:
  131. Binary: 0
  132. BinaryMinDigits: 0
  133. Decimal: 0
  134. DecimalMinDigits: 0
  135. Hex: 0
  136. HexMinDigits: 0
  137. JavaScriptQuotes: Leave
  138. JavaScriptWrapImports: true
  139. KeepEmptyLinesAtTheStartOfBlocks: true
  140. LambdaBodyIndentation: Signature
  141. LineEnding: DeriveLF
  142. MacroBlockBegin: ''
  143. MacroBlockEnd: ''
  144. MaxEmptyLinesToKeep: 1
  145. NamespaceIndentation: None
  146. ObjCBinPackProtocolList: Auto
  147. ObjCBlockIndentWidth: 2
  148. ObjCBreakBeforeNestedBlockParam: true
  149. ObjCSpaceAfterProperty: false
  150. ObjCSpaceBeforeProtocolList: true
  151. PackConstructorInitializers: CurrentLine
  152. PenaltyBreakAssignment: 2
  153. PenaltyBreakBeforeFirstCallParameter: 19
  154. PenaltyBreakComment: 300
  155. PenaltyBreakFirstLessLess: 120
  156. PenaltyBreakOpenParenthesis: 0
  157. PenaltyBreakString: 1000
  158. PenaltyBreakTemplateDeclaration: 10
  159. PenaltyExcessCharacter: 1000000
  160. PenaltyIndentedWhitespace: 0
  161. PenaltyReturnTypeOnItsOwnLine: 1000
  162. PointerAlignment: Left
  163. PPIndentWidth: -1
  164. QualifierAlignment: Left
  165. ReferenceAlignment: Pointer
  166. ReflowComments: true
  167. RemoveBracesLLVM: false
  168. RemoveSemicolon: false
  169. RequiresClausePosition: OwnLine
  170. RequiresExpressionIndentation: OuterScope
  171. SeparateDefinitionBlocks: Always
  172. ShortNamespaceLines: 1
  173. SortIncludes: CaseSensitive
  174. SortJavaStaticImport: Before
  175. SortUsingDeclarations: LexicographicNumeric
  176. SpaceAfterCStyleCast: true
  177. SpaceAfterLogicalNot: false
  178. SpaceAfterTemplateKeyword: true
  179. SpaceAroundPointerQualifiers: Default
  180. SpaceBeforeAssignmentOperators: true
  181. SpaceBeforeCaseColon: false
  182. SpaceBeforeCpp11BracedList: true
  183. SpaceBeforeCtorInitializerColon: true
  184. SpaceBeforeInheritanceColon: true
  185. SpaceBeforeParens: Always
  186. SpaceBeforeParensOptions:
  187. AfterControlStatements: true
  188. AfterForeachMacros: true
  189. AfterFunctionDefinitionName: true
  190. AfterFunctionDeclarationName: true
  191. AfterIfMacros: true
  192. AfterOverloadedOperator: true
  193. AfterRequiresInClause: true
  194. AfterRequiresInExpression: true
  195. BeforeNonEmptyParentheses: true
  196. SpaceBeforeRangeBasedForLoopColon: true
  197. SpaceBeforeSquareBrackets: true
  198. SpaceInEmptyBlock: false
  199. SpaceInEmptyParentheses: false
  200. SpacesBeforeTrailingComments: 1
  201. SpacesInAngles: Never
  202. SpacesInConditionalStatement: false
  203. SpacesInContainerLiterals: true
  204. SpacesInCStyleCastParentheses: false
  205. SpacesInLineCommentPrefix:
  206. Minimum: 1
  207. Maximum: -1
  208. SpacesInParentheses: false
  209. SpacesInSquareBrackets: false
  210. Standard: Latest
  211. StatementAttributeLikeMacros:
  212. - Q_EMIT
  213. StatementMacros:
  214. - Q_UNUSED
  215. - QT_REQUIRE_VERSION
  216. TabWidth: 8
  217. UseTab: Never
  218. WhitespaceSensitiveMacros:
  219. - BOOST_PP_STRINGIZE
  220. - CF_SWIFT_NAME
  221. - NS_SWIFT_NAME
  222. - PP_STRINGIZE
  223. - STRINGIZE
  224. ...