.clang-format 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #
  2. # Copyright (c) 2008-2020 the Urho3D project.
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a copy
  5. # of this software and associated documentation files (the "Software"), to deal
  6. # in the Software without restriction, including without limitation the rights
  7. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. # copies of the Software, and to permit persons to whom the Software is
  9. # furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice shall be included in
  12. # all copies or substantial portions of the Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. # THE SOFTWARE.
  21. #
  22. ---
  23. Language: Cpp
  24. # BasedOnStyle: LLVM
  25. AccessModifierOffset: -4
  26. AlignAfterOpenBracket: Align
  27. AlignConsecutiveMacros: false
  28. AlignConsecutiveAssignments: false
  29. AlignConsecutiveDeclarations: false
  30. AlignEscapedNewlines: Right
  31. AlignOperands: true
  32. AlignTrailingComments: true
  33. AllowAllArgumentsOnNextLine: true
  34. AllowAllConstructorInitializersOnNextLine: true
  35. AllowAllParametersOfDeclarationOnNextLine: true
  36. AllowShortBlocksOnASingleLine: Never
  37. AllowShortCaseLabelsOnASingleLine: false
  38. AllowShortFunctionsOnASingleLine: All
  39. AllowShortLambdasOnASingleLine: All
  40. AllowShortIfStatementsOnASingleLine: Never
  41. AllowShortLoopsOnASingleLine: false
  42. AlwaysBreakAfterDefinitionReturnType: None
  43. AlwaysBreakAfterReturnType: None
  44. AlwaysBreakBeforeMultilineStrings: false
  45. AlwaysBreakTemplateDeclarations: MultiLine
  46. BinPackArguments: true
  47. BinPackParameters: true
  48. BraceWrapping:
  49. AfterCaseLabel: false
  50. AfterClass: false
  51. AfterControlStatement: false
  52. AfterEnum: false
  53. AfterFunction: false
  54. AfterNamespace: false
  55. AfterObjCDeclaration: false
  56. AfterStruct: false
  57. AfterUnion: false
  58. AfterExternBlock: false
  59. BeforeCatch: false
  60. BeforeElse: false
  61. IndentBraces: false
  62. SplitEmptyFunction: true
  63. SplitEmptyRecord: true
  64. SplitEmptyNamespace: true
  65. BreakBeforeBinaryOperators: None
  66. BreakBeforeBraces: Allman
  67. BreakBeforeInheritanceComma: false
  68. BreakInheritanceList: BeforeColon
  69. BreakBeforeTernaryOperators: true
  70. BreakConstructorInitializersBeforeComma: false
  71. BreakConstructorInitializers: BeforeComma
  72. BreakAfterJavaFieldAnnotations: false
  73. BreakStringLiterals: true
  74. ColumnLimit: 120
  75. CommentPragmas: '^ IWYU pragma:'
  76. CompactNamespaces: false
  77. ConstructorInitializerAllOnOneLineOrOnePerLine: false
  78. ConstructorInitializerIndentWidth: 4
  79. ContinuationIndentWidth: 4
  80. Cpp11BracedListStyle: true
  81. DeriveLineEnding: true
  82. DerivePointerAlignment: false
  83. DisableFormat: false
  84. ExperimentalAutoDetectBinPacking: false
  85. FixNamespaceComments: true
  86. ForEachMacros:
  87. - foreach
  88. - Q_FOREACH
  89. - BOOST_FOREACH
  90. IncludeBlocks: Preserve
  91. IncludeCategories:
  92. - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
  93. Priority: 2
  94. SortPriority: 0
  95. - Regex: '^(<|"(gtest|gmock|isl|json)/)'
  96. Priority: 3
  97. SortPriority: 0
  98. - Regex: '.*'
  99. Priority: 1
  100. SortPriority: 0
  101. IncludeIsMainRegex: '(Test)?$'
  102. IncludeIsMainSourceRegex: ''
  103. IndentCaseLabels: false
  104. IndentGotoLabels: true
  105. IndentPPDirectives: None
  106. IndentWidth: 4
  107. IndentWrappedFunctionNames: false
  108. JavaScriptQuotes: Leave
  109. JavaScriptWrapImports: true
  110. KeepEmptyLinesAtTheStartOfBlocks: true
  111. MacroBlockBegin: ''
  112. MacroBlockEnd: ''
  113. MaxEmptyLinesToKeep: 1
  114. NamespaceIndentation: None
  115. ObjCBinPackProtocolList: Auto
  116. ObjCBlockIndentWidth: 2
  117. ObjCSpaceAfterProperty: false
  118. ObjCSpaceBeforeProtocolList: true
  119. PenaltyBreakAssignment: 2
  120. PenaltyBreakBeforeFirstCallParameter: 19
  121. PenaltyBreakComment: 300
  122. PenaltyBreakFirstLessLess: 120
  123. PenaltyBreakString: 1000
  124. PenaltyBreakTemplateDeclaration: 10
  125. PenaltyExcessCharacter: 1000000
  126. PenaltyReturnTypeOnItsOwnLine: 60
  127. PointerAlignment: Left
  128. ReflowComments: true
  129. SortIncludes: true
  130. SortUsingDeclarations: true
  131. SpaceAfterCStyleCast: false
  132. SpaceAfterLogicalNot: false
  133. SpaceAfterTemplateKeyword: true
  134. SpaceBeforeAssignmentOperators: true
  135. SpaceBeforeCpp11BracedList: false
  136. SpaceBeforeCtorInitializerColon: true
  137. SpaceBeforeInheritanceColon: true
  138. SpaceBeforeParens: ControlStatements
  139. SpaceBeforeRangeBasedForLoopColon: true
  140. SpaceInEmptyBlock: false
  141. SpaceInEmptyParentheses: false
  142. SpacesBeforeTrailingComments: 1
  143. SpacesInAngles: false
  144. SpacesInConditionalStatement: false
  145. SpacesInContainerLiterals: true
  146. SpacesInCStyleCastParentheses: false
  147. SpacesInParentheses: false
  148. SpacesInSquareBrackets: false
  149. SpaceBeforeSquareBrackets: false
  150. Standard: Latest
  151. StatementMacros:
  152. - Q_UNUSED
  153. - QT_REQUIRE_VERSION
  154. TabWidth: 4
  155. UseCRLF: true
  156. UseTab: Never
  157. ...
  158. # vi: set ts=2 sw=2 expandtab: