.clang-format 5.3 KB

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