.clang-format 4.9 KB

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