.clang-format 5.2 KB

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