.clang-format 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. # please use clang-format version 16 or later
  2. Standard: c++17
  3. AccessModifierOffset: -8
  4. AlignAfterOpenBracket: Align
  5. AlignConsecutiveAssignments: false
  6. AlignConsecutiveDeclarations: false
  7. AlignEscapedNewlines: Left
  8. AlignOperands: true
  9. AlignTrailingComments: true
  10. AllowAllArgumentsOnNextLine: false
  11. AllowAllConstructorInitializersOnNextLine: false
  12. AllowAllParametersOfDeclarationOnNextLine: false
  13. AllowShortBlocksOnASingleLine: false
  14. AllowShortCaseLabelsOnASingleLine: false
  15. AllowShortFunctionsOnASingleLine: Inline
  16. AllowShortIfStatementsOnASingleLine: false
  17. AllowShortLambdasOnASingleLine: Inline
  18. AllowShortLoopsOnASingleLine: false
  19. AlwaysBreakAfterDefinitionReturnType: None
  20. AlwaysBreakAfterReturnType: None
  21. AlwaysBreakBeforeMultilineStrings: false
  22. AlwaysBreakTemplateDeclarations: false
  23. BinPackArguments: true
  24. BinPackParameters: true
  25. BraceWrapping:
  26. AfterClass: false
  27. AfterControlStatement: false
  28. AfterEnum: false
  29. AfterFunction: true
  30. AfterNamespace: false
  31. AfterObjCDeclaration: false
  32. AfterStruct: false
  33. AfterUnion: false
  34. AfterExternBlock: false
  35. BeforeCatch: false
  36. BeforeElse: false
  37. IndentBraces: false
  38. SplitEmptyFunction: true
  39. SplitEmptyRecord: true
  40. SplitEmptyNamespace: true
  41. BreakBeforeBinaryOperators: None
  42. BreakBeforeBraces: Custom
  43. BreakBeforeTernaryOperators: true
  44. BreakConstructorInitializers: BeforeColon
  45. BreakStringLiterals: false # apparently unpredictable
  46. ColumnLimit: 120
  47. CompactNamespaces: false
  48. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  49. ConstructorInitializerIndentWidth: 8
  50. ContinuationIndentWidth: 8
  51. Cpp11BracedListStyle: true
  52. DerivePointerAlignment: false
  53. DisableFormat: false
  54. FixNamespaceComments: true
  55. ForEachMacros:
  56. - 'json_object_foreach'
  57. - 'json_object_foreach_safe'
  58. - 'json_array_foreach'
  59. - 'HASH_ITER'
  60. IncludeBlocks: Preserve
  61. IndentCaseLabels: false
  62. IndentPPDirectives: None
  63. IndentWidth: 8
  64. IndentWrappedFunctionNames: false
  65. KeepEmptyLinesAtTheStartOfBlocks: true
  66. MaxEmptyLinesToKeep: 1
  67. NamespaceIndentation: None
  68. ObjCBinPackProtocolList: Auto
  69. ObjCBlockIndentWidth: 8
  70. ObjCSpaceAfterProperty: true
  71. ObjCSpaceBeforeProtocolList: true
  72. PenaltyBreakAssignment: 10
  73. PenaltyBreakBeforeFirstCallParameter: 30
  74. PenaltyBreakComment: 10
  75. PenaltyBreakFirstLessLess: 0
  76. PenaltyBreakString: 10
  77. PenaltyExcessCharacter: 100
  78. PenaltyReturnTypeOnItsOwnLine: 60
  79. PointerAlignment: Right
  80. ReflowComments: false
  81. SortIncludes: false
  82. SortUsingDeclarations: false
  83. SpaceAfterCStyleCast: false
  84. SpaceAfterLogicalNot: false
  85. SpaceAfterTemplateKeyword: false
  86. SpaceBeforeAssignmentOperators: true
  87. SpaceBeforeCtorInitializerColon: true
  88. SpaceBeforeInheritanceColon: true
  89. SpaceBeforeParens: ControlStatements
  90. SpaceBeforeRangeBasedForLoopColon: true
  91. SpaceInEmptyParentheses: false
  92. SpacesBeforeTrailingComments: 1
  93. SpacesInAngles: false
  94. SpacesInCStyleCastParentheses: false
  95. SpacesInContainerLiterals: false
  96. SpacesInParentheses: false
  97. SpacesInSquareBrackets: false
  98. StatementMacros:
  99. - 'Q_OBJECT'
  100. TabWidth: 8
  101. TypenameMacros:
  102. - 'DARRAY'
  103. UseTab: ForContinuationAndIndentation
  104. ---
  105. Language: ObjC
  106. AccessModifierOffset: 2
  107. AlignArrayOfStructures: Right
  108. AlignConsecutiveAssignments: None
  109. AlignConsecutiveBitFields: None
  110. AlignConsecutiveDeclarations: None
  111. AlignConsecutiveMacros:
  112. Enabled: true
  113. AcrossEmptyLines: false
  114. AcrossComments: true
  115. AllowShortBlocksOnASingleLine: Never
  116. AllowShortEnumsOnASingleLine: false
  117. AllowShortFunctionsOnASingleLine: Empty
  118. AllowShortIfStatementsOnASingleLine: Never
  119. AllowShortLambdasOnASingleLine: None
  120. AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge']
  121. BitFieldColonSpacing: Both
  122. #BreakBeforeBraces: Webkit
  123. BreakBeforeBraces: Custom
  124. BraceWrapping:
  125. AfterCaseLabel: false
  126. AfterClass: true
  127. AfterControlStatement: Never
  128. AfterEnum: false
  129. AfterFunction: true
  130. AfterNamespace: false
  131. AfterObjCDeclaration: false
  132. AfterStruct: false
  133. AfterUnion: false
  134. AfterExternBlock: false
  135. BeforeCatch: false
  136. BeforeElse: false
  137. BeforeLambdaBody: false
  138. BeforeWhile: false
  139. IndentBraces: false
  140. SplitEmptyFunction: false
  141. SplitEmptyRecord: false
  142. SplitEmptyNamespace: true
  143. BreakAfterAttributes: Never
  144. BreakArrays: false
  145. BreakBeforeConceptDeclarations: Allowed
  146. BreakBeforeInlineASMColon: OnlyMultiline
  147. BreakConstructorInitializers: AfterColon
  148. BreakInheritanceList: AfterComma
  149. ColumnLimit: 120
  150. ConstructorInitializerIndentWidth: 4
  151. ContinuationIndentWidth: 4
  152. EmptyLineAfterAccessModifier: Never
  153. EmptyLineBeforeAccessModifier: LogicalBlock
  154. ExperimentalAutoDetectBinPacking: false
  155. FixNamespaceComments: true
  156. IndentAccessModifiers: false
  157. IndentCaseBlocks: false
  158. IndentCaseLabels: true
  159. IndentExternBlock: Indent
  160. IndentGotoLabels: false
  161. IndentRequiresClause: true
  162. IndentWidth: 4
  163. IndentWrappedFunctionNames: true
  164. InsertBraces: false
  165. InsertNewlineAtEOF: true
  166. KeepEmptyLinesAtTheStartOfBlocks: false
  167. LambdaBodyIndentation: Signature
  168. NamespaceIndentation: All
  169. ObjCBinPackProtocolList: Auto
  170. ObjCBlockIndentWidth: 4
  171. ObjCBreakBeforeNestedBlockParam: false
  172. ObjCSpaceAfterProperty: true
  173. ObjCSpaceBeforeProtocolList: true
  174. PPIndentWidth: -1
  175. PackConstructorInitializers: NextLine
  176. QualifierAlignment: Leave
  177. ReferenceAlignment: Right
  178. RemoveSemicolon: false
  179. RequiresClausePosition: WithPreceding
  180. RequiresExpressionIndentation: OuterScope
  181. SeparateDefinitionBlocks: Leave
  182. ShortNamespaceLines: 1
  183. SortIncludes: false
  184. #SortUsingDeclarations: LexicographicNumeric
  185. SortUsingDeclarations: true
  186. SpaceAfterCStyleCast: true
  187. SpaceAfterLogicalNot: false
  188. SpaceAroundPointerQualifiers: Default
  189. SpaceBeforeCaseColon: false
  190. SpaceBeforeCpp11BracedList: true
  191. SpaceBeforeCtorInitializerColon: true
  192. SpaceBeforeInheritanceColon: true
  193. SpaceBeforeParens: ControlStatements
  194. SpaceBeforeRangeBasedForLoopColon: true
  195. SpaceBeforeSquareBrackets: false
  196. SpaceInEmptyBlock: false
  197. SpaceInEmptyParentheses: false
  198. SpacesBeforeTrailingComments: 2
  199. SpacesInConditionalStatement: false
  200. SpacesInLineCommentPrefix:
  201. Minimum: 1
  202. Maximum: -1
  203. Standard: c++17
  204. TabWidth: 4
  205. UseTab: Never