.clang-format 5.3 KB

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