.clang-format 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. # Commented out parameters are those with the same value as base LLVM style.
  2. # We can uncomment them if we want to change their value, or enforce the
  3. # chosen value in case the base style changes (last sync: Clang 13.0).
  4. ---
  5. ### General config, applies to all languages ###
  6. BasedOnStyle: LLVM
  7. AccessModifierOffset: -4
  8. AlignAfterOpenBracket: DontAlign
  9. # AlignArrayOfStructures: None
  10. # AlignConsecutiveMacros: None
  11. # AlignConsecutiveAssignments: None
  12. # AlignConsecutiveBitFields: None
  13. # AlignConsecutiveDeclarations: None
  14. # AlignEscapedNewlines: Right
  15. AlignOperands: DontAlign
  16. AlignTrailingComments: false
  17. # AllowAllArgumentsOnNextLine: true
  18. # AllowAllConstructorInitializersOnNextLine: true
  19. AllowAllParametersOfDeclarationOnNextLine: false
  20. # AllowShortEnumsOnASingleLine: true
  21. # AllowShortBlocksOnASingleLine: Never
  22. # AllowShortCaseLabelsOnASingleLine: false
  23. AllowShortFunctionsOnASingleLine: Inline
  24. # AllowShortLambdasOnASingleLine: All
  25. # AllowShortIfStatementsOnASingleLine: Never
  26. # AllowShortLoopsOnASingleLine: false
  27. # AlwaysBreakAfterDefinitionReturnType: None
  28. # AlwaysBreakAfterReturnType: None
  29. # AlwaysBreakBeforeMultilineStrings: false
  30. # AlwaysBreakTemplateDeclarations: MultiLine
  31. # AttributeMacros:
  32. # - __capability
  33. # BinPackArguments: true
  34. # BinPackParameters: true
  35. # BraceWrapping:
  36. # AfterCaseLabel: false
  37. # AfterClass: false
  38. # AfterControlStatement: Never
  39. # AfterEnum: false
  40. # AfterFunction: false
  41. # AfterNamespace: false
  42. # AfterObjCDeclaration: false
  43. # AfterStruct: false
  44. # AfterUnion: false
  45. # AfterExternBlock: false
  46. # BeforeCatch: false
  47. # BeforeElse: false
  48. # BeforeLambdaBody: false
  49. # BeforeWhile: false
  50. # IndentBraces: false
  51. # SplitEmptyFunction: true
  52. # SplitEmptyRecord: true
  53. # SplitEmptyNamespace: true
  54. # BreakBeforeBinaryOperators: None
  55. # BreakBeforeConceptDeclarations: true
  56. # BreakBeforeBraces: Attach
  57. # BreakBeforeInheritanceComma: false
  58. # BreakInheritanceList: BeforeColon
  59. # BreakBeforeTernaryOperators: true
  60. # BreakConstructorInitializersBeforeComma: false
  61. BreakConstructorInitializers: AfterColon
  62. # BreakStringLiterals: true
  63. ColumnLimit: 0
  64. # CommentPragmas: '^ IWYU pragma:'
  65. # CompactNamespaces: false
  66. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  67. ConstructorInitializerIndentWidth: 8
  68. ContinuationIndentWidth: 8
  69. Cpp11BracedListStyle: false
  70. # DeriveLineEnding: true
  71. # DerivePointerAlignment: false
  72. # DisableFormat: false
  73. # EmptyLineAfterAccessModifier: Never
  74. # EmptyLineBeforeAccessModifier: LogicalBlock
  75. # ExperimentalAutoDetectBinPacking: false
  76. # FixNamespaceComments: true
  77. # ForEachMacros:
  78. # - foreach
  79. # - Q_FOREACH
  80. # - BOOST_FOREACH
  81. # IfMacros:
  82. # - KJ_IF_MAYBE
  83. # IncludeBlocks: Preserve
  84. IncludeCategories:
  85. - Regex: '".*"'
  86. Priority: 1
  87. - Regex: '^<.*\.h>'
  88. Priority: 2
  89. - Regex: '^<.*'
  90. Priority: 3
  91. # IncludeIsMainRegex: '(Test)?$'
  92. # IncludeIsMainSourceRegex: ''
  93. # IndentAccessModifiers: false
  94. IndentCaseLabels: true
  95. # IndentCaseBlocks: false
  96. # IndentGotoLabels: true
  97. # IndentPPDirectives: None
  98. # IndentExternBlock: AfterExternBlock
  99. # IndentRequires: false
  100. IndentWidth: 4
  101. # IndentWrappedFunctionNames: false
  102. # InsertTrailingCommas: None
  103. # JavaScriptQuotes: Leave
  104. # JavaScriptWrapImports: true
  105. KeepEmptyLinesAtTheStartOfBlocks: false
  106. # LambdaBodyIndentation: Signature
  107. # MacroBlockBegin: ''
  108. # MacroBlockEnd: ''
  109. # MaxEmptyLinesToKeep: 1
  110. # NamespaceIndentation: None
  111. # PenaltyBreakAssignment: 2
  112. # PenaltyBreakBeforeFirstCallParameter: 19
  113. # PenaltyBreakComment: 300
  114. # PenaltyBreakFirstLessLess: 120
  115. # PenaltyBreakString: 1000
  116. # PenaltyBreakTemplateDeclaration: 10
  117. # PenaltyExcessCharacter: 1000000
  118. # PenaltyReturnTypeOnItsOwnLine: 60
  119. # PenaltyIndentedWhitespace: 0
  120. # PointerAlignment: Right
  121. # PPIndentWidth: -1
  122. # ReferenceAlignment: Pointer
  123. # ReflowComments: true
  124. # ShortNamespaceLines: 1
  125. # SortIncludes: CaseSensitive
  126. # SortJavaStaticImport: Before
  127. # SortUsingDeclarations: true
  128. # SpaceAfterCStyleCast: false
  129. # SpaceAfterLogicalNot: false
  130. # SpaceAfterTemplateKeyword: true
  131. # SpaceBeforeAssignmentOperators: true
  132. # SpaceBeforeCaseColon: false
  133. # SpaceBeforeCpp11BracedList: false
  134. # SpaceBeforeCtorInitializerColon: true
  135. # SpaceBeforeInheritanceColon: true
  136. # SpaceBeforeParens: ControlStatements
  137. # SpaceAroundPointerQualifiers: Default
  138. # SpaceBeforeRangeBasedForLoopColon: true
  139. # SpaceInEmptyParentheses: false
  140. # SpacesBeforeTrailingComments: 1
  141. # SpaceInEmptyBlock: false
  142. # SpaceInEmptyParentheses: false
  143. # SpacesBeforeTrailingComments: 1
  144. # SpacesInAngles: Never
  145. # SpacesInContainerLiterals: true
  146. # SpacesInConditionalStatement: false
  147. # SpacesInContainerLiterals: true
  148. # SpacesInCStyleCastParentheses: false
  149. ## Godot TODO: We'll want to use a min of 1, but we need to see how to fix
  150. ## our comment capitalization at the same time.
  151. SpacesInLineCommentPrefix:
  152. Minimum: 0
  153. Maximum: -1
  154. # SpacesInParentheses: false
  155. # SpacesInSquareBrackets: false
  156. # SpaceBeforeSquareBrackets: false
  157. # BitFieldColonSpacing: Both
  158. # StatementAttributeLikeMacros:
  159. # - Q_EMIT
  160. # StatementMacros:
  161. # - Q_UNUSED
  162. # - QT_REQUIRE_VERSION
  163. TabWidth: 4
  164. # UseCRLF: false
  165. UseTab: Always
  166. # WhitespaceSensitiveMacros:
  167. # - STRINGIZE
  168. # - PP_STRINGIZE
  169. # - BOOST_PP_STRINGIZE
  170. # - NS_SWIFT_NAME
  171. # - CF_SWIFT_NAME
  172. ---
  173. ### C++ specific config ###
  174. Language: Cpp
  175. Standard: c++14
  176. ---
  177. ### ObjC specific config ###
  178. Language: ObjC
  179. # ObjCBinPackProtocolList: Auto
  180. ObjCBlockIndentWidth: 4
  181. # ObjCBreakBeforeNestedBlockParam: true
  182. # ObjCSpaceAfterProperty: false
  183. # ObjCSpaceBeforeProtocolList: true
  184. ---
  185. ### Java specific config ###
  186. Language: Java
  187. # BreakAfterJavaFieldAnnotations: false
  188. JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
  189. ...