.clang-format 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. ---
  2. Language: Cpp
  3. AccessModifierOffset: -4
  4. AlignAfterOpenBracket: Align
  5. AlignConsecutiveMacros: None
  6. AlignConsecutiveAssignments: None
  7. AlignConsecutiveBitFields: None
  8. AlignConsecutiveDeclarations: None
  9. AlignEscapedNewlines: Right
  10. AlignOperands: AlignAfterOperator
  11. AlignTrailingComments: true
  12. AllowAllArgumentsOnNextLine: true
  13. AllowAllConstructorInitializersOnNextLine: true
  14. AllowAllParametersOfDeclarationOnNextLine: true
  15. AllowShortEnumsOnASingleLine: true
  16. AllowShortBlocksOnASingleLine: Empty
  17. AllowShortCaseLabelsOnASingleLine: false
  18. AllowShortFunctionsOnASingleLine: Inline
  19. AllowShortLambdasOnASingleLine: All
  20. AllowShortIfStatementsOnASingleLine: Never
  21. AllowShortLoopsOnASingleLine: false
  22. AlwaysBreakAfterDefinitionReturnType: None
  23. AlwaysBreakAfterReturnType: None
  24. AlwaysBreakBeforeMultilineStrings: true
  25. AlwaysBreakTemplateDeclarations: Yes
  26. AttributeMacros:
  27. - __capability
  28. BinPackArguments: true
  29. BinPackParameters: false
  30. BitFieldColonSpacing: Both
  31. BraceWrapping:
  32. AfterCaseLabel: false
  33. AfterClass: false
  34. AfterControlStatement: Never
  35. AfterEnum: false
  36. AfterFunction: false
  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: false
  48. SplitEmptyRecord: false
  49. SplitEmptyNamespace: false
  50. BreakBeforeBinaryOperators: All
  51. BreakBeforeBraces: Custom
  52. BreakBeforeConceptDeclarations: true
  53. BreakBeforeTernaryOperators: true
  54. BreakBeforeInheritanceComma: false
  55. BreakConstructorInitializersBeforeComma: true
  56. BreakConstructorInitializers: BeforeComma
  57. BreakInheritanceList: BeforeComma
  58. BreakAfterJavaFieldAnnotations: false
  59. BreakStringLiterals: true
  60. ColumnLimit: 0
  61. CommentPragmas: '^ IWYU pragma:'
  62. CompactNamespaces: false
  63. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  64. ConstructorInitializerIndentWidth: 8
  65. ContinuationIndentWidth: 4
  66. Cpp11BracedListStyle: true
  67. DeriveLineEnding: true
  68. DerivePointerAlignment: false
  69. DisableFormat: false
  70. # EmptyLineAfterAccessModifier: Leave
  71. EmptyLineBeforeAccessModifier: Always
  72. ExperimentalAutoDetectBinPacking: false
  73. FixNamespaceComments: true
  74. ForEachMacros:
  75. - foreach
  76. - Q_FOREACH
  77. - BOOST_FOREACH
  78. IncludeBlocks: Regroup
  79. IncludeCategories:
  80. - Regex: '^<mach/'
  81. Priority: 1
  82. SortPriority: 0
  83. CaseSensitive: false
  84. - Regex: '^<windows.h>'
  85. Priority: 1
  86. SortPriority: 0
  87. CaseSensitive: false
  88. - Regex: '(^<signal.h>)|(^<sys/ucontext.h>)|(^<ucontext.h>)'
  89. Priority: 1
  90. SortPriority: 0
  91. CaseSensitive: false
  92. - Regex: '^<([^\.])*>$'
  93. Priority: 2
  94. SortPriority: 0
  95. CaseSensitive: false
  96. - Regex: '^<.*\.'
  97. Priority: 3
  98. SortPriority: 0
  99. CaseSensitive: false
  100. - Regex: '.*'
  101. Priority: 4
  102. SortPriority: 0
  103. CaseSensitive: false
  104. IncludeIsMainRegex: '([-_](test|unittest))?$'
  105. IncludeIsMainSourceRegex: ''
  106. # IndentAccessModifiers: false
  107. IndentCaseBlocks: false
  108. IndentCaseLabels: false
  109. IndentExternBlock: NoIndent
  110. IndentGotoLabels: false
  111. IndentPPDirectives: AfterHash
  112. IndentRequires: false
  113. IndentWidth: 4
  114. IndentWrappedFunctionNames: false
  115. # InsertTrailingCommas: None
  116. JavaScriptQuotes: Leave
  117. JavaScriptWrapImports: true
  118. KeepEmptyLinesAtTheStartOfBlocks: false
  119. MacroBlockBegin: ''
  120. MacroBlockEnd: ''
  121. MaxEmptyLinesToKeep: 1
  122. NamespaceIndentation: None
  123. NamespaceMacros:
  124. ObjCBinPackProtocolList: Never
  125. ObjCBlockIndentWidth: 2
  126. ObjCBreakBeforeNestedBlockParam: true
  127. ObjCSpaceAfterProperty: false
  128. ObjCSpaceBeforeProtocolList: true
  129. PenaltyBreakAssignment: 2
  130. PenaltyBreakBeforeFirstCallParameter: 1
  131. PenaltyBreakComment: 300
  132. PenaltyBreakFirstLessLess: 120
  133. PenaltyBreakString: 1000
  134. PenaltyBreakTemplateDeclaration: 10
  135. PenaltyExcessCharacter: 1000000
  136. PenaltyReturnTypeOnItsOwnLine: 200
  137. PenaltyIndentedWhitespace: 0
  138. PointerAlignment: Left
  139. RawStringFormats:
  140. - Language: Cpp
  141. Delimiters:
  142. - cc
  143. - CC
  144. - cpp
  145. - Cpp
  146. - CPP
  147. - 'c++'
  148. - 'C++'
  149. CanonicalDelimiter: ''
  150. BasedOnStyle: google
  151. - Language: TextProto
  152. Delimiters:
  153. - pb
  154. - PB
  155. - proto
  156. - PROTO
  157. EnclosingFunctions:
  158. - EqualsProto
  159. - EquivToProto
  160. - PARSE_PARTIAL_TEXT_PROTO
  161. - PARSE_TEST_PROTO
  162. - PARSE_TEXT_PROTO
  163. - ParseTextOrDie
  164. - ParseTextProtoOrDie
  165. - ParseTestProto
  166. - ParsePartialTestProto
  167. CanonicalDelimiter: ''
  168. BasedOnStyle: google
  169. ReflowComments: true
  170. # ShortNamespaceLines: 5
  171. SortIncludes: true
  172. SortJavaStaticImport: Before
  173. SortUsingDeclarations: true
  174. SpaceAfterCStyleCast: false
  175. SpaceAfterLogicalNot: false
  176. SpaceAfterTemplateKeyword: false
  177. SpaceAroundPointerQualifiers: Default
  178. SpaceBeforeAssignmentOperators: true
  179. SpaceBeforeCaseColon: false
  180. SpaceBeforeCpp11BracedList: false
  181. SpaceBeforeCtorInitializerColon: true
  182. SpaceBeforeInheritanceColon: true
  183. SpaceBeforeParens: ControlStatements
  184. SpaceBeforeRangeBasedForLoopColon: true
  185. SpaceBeforeSquareBrackets: false
  186. SpaceInEmptyBlock: false
  187. SpaceInEmptyParentheses: false
  188. SpacesBeforeTrailingComments: 2
  189. SpacesInAngles: false
  190. SpacesInConditionalStatement: false
  191. SpacesInCStyleCastParentheses: false
  192. SpacesInContainerLiterals: false
  193. # SpacesInLineCommentPrefix: -1
  194. SpacesInParentheses: false
  195. SpacesInSquareBrackets: false
  196. Standard: Latest
  197. StatementAttributeLikeMacros:
  198. - Q_EMIT
  199. StatementMacros:
  200. - Q_UNUSED
  201. - QT_REQUIRE_VERSION
  202. TabWidth: 4
  203. TypenameMacros:
  204. UseCRLF: false
  205. UseTab: Never
  206. WhitespaceSensitiveMacros:
  207. - STRINGIZE
  208. - PP_STRINGIZE
  209. - BOOST_PP_STRINGIZE
  210. - NS_SWIFT_NAME
  211. - CF_SWIFT_NAME
  212. - FCODE
  213. - ICODE
  214. ...