.clang-format 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: Google
  4. AccessModifierOffset: -4
  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: Left
  32. AlignOperands: Align
  33. AlignTrailingComments:
  34. Kind: Always
  35. OverEmptyLines: 0
  36. AllowAllArgumentsOnNextLine: true
  37. AllowAllParametersOfDeclarationOnNextLine: true
  38. AllowShortBlocksOnASingleLine: Never
  39. AllowShortCaseLabelsOnASingleLine: false
  40. AllowShortEnumsOnASingleLine: true
  41. AllowShortFunctionsOnASingleLine: All
  42. AllowShortIfStatementsOnASingleLine: WithoutElse
  43. AllowShortLambdasOnASingleLine: All
  44. AllowShortLoopsOnASingleLine: true
  45. AlwaysBreakAfterDefinitionReturnType: None
  46. AlwaysBreakAfterReturnType: None
  47. AlwaysBreakBeforeMultilineStrings: true
  48. AlwaysBreakTemplateDeclarations: Yes
  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: BeforeColon
  82. BreakInheritanceList: BeforeColon
  83. BreakStringLiterals: true
  84. ColumnLimit: 80
  85. CommentPragmas: '^ IWYU pragma:'
  86. CompactNamespaces: false
  87. ConstructorInitializerIndentWidth: 4
  88. ContinuationIndentWidth: 4
  89. Cpp11BracedListStyle: true
  90. DerivePointerAlignment: true
  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: Regroup
  103. IncludeCategories:
  104. - Regex: '^<ext/.*\.h>'
  105. Priority: 2
  106. SortPriority: 0
  107. CaseSensitive: false
  108. - Regex: '^<.*\.h>'
  109. Priority: 1
  110. SortPriority: 0
  111. CaseSensitive: false
  112. - Regex: '^<.*'
  113. Priority: 2
  114. SortPriority: 0
  115. CaseSensitive: false
  116. - Regex: '.*'
  117. Priority: 3
  118. SortPriority: 0
  119. CaseSensitive: false
  120. IncludeIsMainRegex: '([-_](test|unittest))?$'
  121. IncludeIsMainSourceRegex: ''
  122. IndentAccessModifiers: false
  123. IndentCaseLabels: true
  124. IndentExternBlock: AfterExternBlock
  125. IndentGotoLabels: true
  126. IndentPPDirectives: None
  127. IndentRequiresClause: true
  128. IndentWidth: 4
  129. IndentWrappedFunctionNames: false
  130. InsertBraces: false
  131. InsertNewlineAtEOF: false
  132. InsertTrailingCommas: None
  133. IntegerLiteralSeparator:
  134. Binary: 0
  135. BinaryMinDigits: 0
  136. Decimal: 0
  137. DecimalMinDigits: 0
  138. Hex: 0
  139. HexMinDigits: 0
  140. JavaScriptQuotes: Leave
  141. JavaScriptWrapImports: true
  142. KeepEmptyLinesAtTheStartOfBlocks: false
  143. LambdaBodyIndentation: Signature
  144. LineEnding: DeriveLF
  145. MacroBlockBegin: ''
  146. MacroBlockEnd: ''
  147. MaxEmptyLinesToKeep: 1
  148. NamespaceIndentation: None
  149. ObjCBinPackProtocolList: Never
  150. ObjCBlockIndentWidth: 2
  151. ObjCBreakBeforeNestedBlockParam: true
  152. ObjCSpaceAfterProperty: false
  153. ObjCSpaceBeforeProtocolList: true
  154. PackConstructorInitializers: NextLine
  155. PenaltyBreakAssignment: 2
  156. PenaltyBreakBeforeFirstCallParameter: 1
  157. PenaltyBreakComment: 300
  158. PenaltyBreakFirstLessLess: 120
  159. PenaltyBreakOpenParenthesis: 0
  160. PenaltyBreakString: 1000
  161. PenaltyBreakTemplateDeclaration: 10
  162. PenaltyExcessCharacter: 1000000
  163. PenaltyIndentedWhitespace: 0
  164. PenaltyReturnTypeOnItsOwnLine: 200
  165. PointerAlignment: Left
  166. PPIndentWidth: -1
  167. QualifierAlignment: Leave
  168. RawStringFormats:
  169. - Language: Cpp
  170. Delimiters:
  171. - cc
  172. - CC
  173. - cpp
  174. - Cpp
  175. - CPP
  176. - 'c++'
  177. - 'C++'
  178. CanonicalDelimiter: ''
  179. BasedOnStyle: google
  180. - Language: TextProto
  181. Delimiters:
  182. - pb
  183. - PB
  184. - proto
  185. - PROTO
  186. EnclosingFunctions:
  187. - EqualsProto
  188. - EquivToProto
  189. - PARSE_PARTIAL_TEXT_PROTO
  190. - PARSE_TEST_PROTO
  191. - PARSE_TEXT_PROTO
  192. - ParseTextOrDie
  193. - ParseTextProtoOrDie
  194. - ParseTestProto
  195. - ParsePartialTestProto
  196. CanonicalDelimiter: pb
  197. BasedOnStyle: google
  198. ReferenceAlignment: Pointer
  199. ReflowComments: true
  200. RemoveBracesLLVM: false
  201. RemoveSemicolon: false
  202. RequiresClausePosition: OwnLine
  203. RequiresExpressionIndentation: OuterScope
  204. SeparateDefinitionBlocks: Leave
  205. ShortNamespaceLines: 1
  206. SortIncludes: CaseSensitive
  207. SortJavaStaticImport: Before
  208. SortUsingDeclarations: LexicographicNumeric
  209. SpaceAfterCStyleCast: false
  210. SpaceAfterLogicalNot: false
  211. SpaceAfterTemplateKeyword: true
  212. SpaceAroundPointerQualifiers: Default
  213. SpaceBeforeAssignmentOperators: true
  214. SpaceBeforeCaseColon: false
  215. SpaceBeforeCpp11BracedList: false
  216. SpaceBeforeCtorInitializerColon: true
  217. SpaceBeforeInheritanceColon: true
  218. SpaceBeforeParens: ControlStatements
  219. SpaceBeforeParensOptions:
  220. AfterControlStatements: true
  221. AfterForeachMacros: true
  222. AfterFunctionDefinitionName: false
  223. AfterFunctionDeclarationName: false
  224. AfterIfMacros: true
  225. AfterOverloadedOperator: false
  226. AfterRequiresInClause: false
  227. AfterRequiresInExpression: false
  228. BeforeNonEmptyParentheses: false
  229. SpaceBeforeRangeBasedForLoopColon: true
  230. SpaceBeforeSquareBrackets: false
  231. SpaceInEmptyBlock: false
  232. SpaceInEmptyParentheses: false
  233. SpacesBeforeTrailingComments: 2
  234. SpacesInAngles: Never
  235. SpacesInConditionalStatement: false
  236. SpacesInContainerLiterals: true
  237. SpacesInCStyleCastParentheses: false
  238. SpacesInLineCommentPrefix:
  239. Minimum: 1
  240. Maximum: -1
  241. SpacesInParentheses: false
  242. SpacesInSquareBrackets: false
  243. Standard: Auto
  244. StatementAttributeLikeMacros:
  245. - Q_EMIT
  246. StatementMacros:
  247. - Q_UNUSED
  248. - QT_REQUIRE_VERSION
  249. TabWidth: 8
  250. UseTab: Never
  251. WhitespaceSensitiveMacros:
  252. - BOOST_PP_STRINGIZE
  253. - CF_SWIFT_NAME
  254. - NS_SWIFT_NAME
  255. - PP_STRINGIZE
  256. - STRINGIZE
  257. ...