.clang-format 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: Google
  4. # AccessModifierOffset: -1
  5. AlignAfterOpenBracket: Align
  6. AlignConsecutiveMacros: false
  7. AlignConsecutiveAssignments: false
  8. AlignConsecutiveBitFields: false
  9. AlignConsecutiveDeclarations: false
  10. AlignEscapedNewlines: Left
  11. AlignOperands: Align
  12. AlignTrailingComments: true
  13. AllowAllArgumentsOnNextLine: true
  14. AllowAllConstructorInitializersOnNextLine: true
  15. AllowAllParametersOfDeclarationOnNextLine: true
  16. AllowShortEnumsOnASingleLine: true
  17. AllowShortBlocksOnASingleLine: Never
  18. AllowShortCaseLabelsOnASingleLine: false
  19. AllowShortFunctionsOnASingleLine: All
  20. AllowShortLambdasOnASingleLine: All
  21. AllowShortIfStatementsOnASingleLine: WithoutElse
  22. AllowShortLoopsOnASingleLine: true
  23. AlwaysBreakAfterDefinitionReturnType: None
  24. AlwaysBreakAfterReturnType: None
  25. AlwaysBreakBeforeMultilineStrings: true
  26. AlwaysBreakTemplateDeclarations: Yes
  27. BinPackArguments: true
  28. BinPackParameters: true
  29. BraceWrapping:
  30. AfterCaseLabel: false
  31. AfterClass: false
  32. AfterControlStatement: MultiLine
  33. AfterEnum: false
  34. AfterFunction: false
  35. AfterNamespace: false
  36. AfterObjCDeclaration: false
  37. AfterStruct: false
  38. AfterUnion: false
  39. AfterExternBlock: false
  40. BeforeCatch: false
  41. BeforeElse: false
  42. BeforeLambdaBody: false
  43. BeforeWhile: false
  44. IndentBraces: false
  45. SplitEmptyFunction: true
  46. SplitEmptyRecord: true
  47. SplitEmptyNamespace: true
  48. BreakBeforeBinaryOperators: None
  49. BreakBeforeBraces: Attach
  50. BreakBeforeInheritanceComma: false
  51. BreakInheritanceList: BeforeColon
  52. BreakBeforeTernaryOperators: true
  53. BreakConstructorInitializersBeforeComma: false
  54. BreakConstructorInitializers: BeforeColon
  55. BreakAfterJavaFieldAnnotations: false
  56. BreakStringLiterals: true
  57. ColumnLimit: 80
  58. CommentPragmas: '^ IWYU pragma:'
  59. CompactNamespaces: false
  60. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  61. ConstructorInitializerIndentWidth: 4
  62. ContinuationIndentWidth: 4
  63. Cpp11BracedListStyle: true
  64. DeriveLineEnding: true
  65. DerivePointerAlignment: true
  66. DisableFormat: false
  67. ExperimentalAutoDetectBinPacking: false
  68. FixNamespaceComments: true
  69. ForEachMacros:
  70. - foreach
  71. - Q_FOREACH
  72. - BOOST_FOREACH
  73. IncludeBlocks: Regroup
  74. IncludeCategories:
  75. - Regex: '^<ext/.*\.h>'
  76. Priority: 2
  77. SortPriority: 0
  78. - Regex: '^<.*\.h>'
  79. Priority: 1
  80. SortPriority: 0
  81. - Regex: '^<.*'
  82. Priority: 2
  83. SortPriority: 0
  84. - Regex: '.*'
  85. Priority: 3
  86. SortPriority: 0
  87. IncludeIsMainRegex: '([-_](test|unittest))?$'
  88. IncludeIsMainSourceRegex: ''
  89. IndentCaseLabels: true
  90. IndentCaseBlocks: false
  91. IndentGotoLabels: true
  92. IndentPPDirectives: None
  93. IndentExternBlock: AfterExternBlock
  94. IndentWidth: 2
  95. IndentWrappedFunctionNames: false
  96. InsertTrailingCommas: None
  97. JavaScriptQuotes: Leave
  98. JavaScriptWrapImports: true
  99. KeepEmptyLinesAtTheStartOfBlocks: false
  100. MacroBlockBegin: ''
  101. MacroBlockEnd: ''
  102. MaxEmptyLinesToKeep: 1
  103. NamespaceIndentation: None
  104. ObjCBinPackProtocolList: Never
  105. ObjCBlockIndentWidth: 2
  106. ObjCBreakBeforeNestedBlockParam: true
  107. ObjCSpaceAfterProperty: false
  108. ObjCSpaceBeforeProtocolList: true
  109. PenaltyBreakAssignment: 2
  110. PenaltyBreakBeforeFirstCallParameter: 1
  111. PenaltyBreakComment: 300
  112. PenaltyBreakFirstLessLess: 120
  113. PenaltyBreakString: 1000
  114. PenaltyBreakTemplateDeclaration: 10
  115. PenaltyExcessCharacter: 1000000
  116. PenaltyReturnTypeOnItsOwnLine: 200
  117. PointerAlignment: Left
  118. RawStringFormats:
  119. - Language: Cpp
  120. Delimiters:
  121. - cc
  122. - CC
  123. - cpp
  124. - Cpp
  125. - CPP
  126. - 'c++'
  127. - 'C++'
  128. CanonicalDelimiter: ''
  129. BasedOnStyle: google
  130. - Language: TextProto
  131. Delimiters:
  132. - pb
  133. - PB
  134. - proto
  135. - PROTO
  136. EnclosingFunctions:
  137. - EqualsProto
  138. - EquivToProto
  139. - PARSE_PARTIAL_TEXT_PROTO
  140. - PARSE_TEST_PROTO
  141. - PARSE_TEXT_PROTO
  142. - ParseTextOrDie
  143. - ParseTextProtoOrDie
  144. - ParseTestProto
  145. - ParsePartialTestProto
  146. CanonicalDelimiter: ''
  147. BasedOnStyle: google
  148. ReflowComments: true
  149. SortIncludes: false
  150. SortUsingDeclarations: true
  151. SpaceAfterCStyleCast: false
  152. SpaceAfterLogicalNot: false
  153. SpaceAfterTemplateKeyword: true
  154. SpaceBeforeAssignmentOperators: true
  155. SpaceBeforeCpp11BracedList: false
  156. SpaceBeforeCtorInitializerColon: true
  157. SpaceBeforeInheritanceColon: true
  158. SpaceBeforeParens: ControlStatements
  159. SpaceBeforeRangeBasedForLoopColon: true
  160. SpaceInEmptyBlock: false
  161. SpaceInEmptyParentheses: false
  162. SpacesBeforeTrailingComments: 2
  163. SpacesInAngles: false
  164. SpacesInConditionalStatement: false
  165. SpacesInContainerLiterals: true
  166. SpacesInCStyleCastParentheses: false
  167. SpacesInParentheses: false
  168. SpacesInSquareBrackets: false
  169. SpaceBeforeSquareBrackets: false
  170. Standard: Auto
  171. StatementMacros:
  172. - Q_UNUSED
  173. - QT_REQUIRE_VERSION
  174. TabWidth: 8
  175. UseCRLF: false
  176. UseTab: Never
  177. WhitespaceSensitiveMacros:
  178. - STRINGIZE
  179. - PP_STRINGIZE
  180. - BOOST_PP_STRINGIZE
  181. ...