1
0

.clang-format 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. SkipMacroDefinitionBody: true
  82. SortIncludes: false
  83. SortUsingDeclarations: false
  84. SpaceAfterCStyleCast: false
  85. SpaceAfterLogicalNot: false
  86. SpaceAfterTemplateKeyword: false
  87. SpaceBeforeAssignmentOperators: true
  88. SpaceBeforeCtorInitializerColon: true
  89. SpaceBeforeInheritanceColon: true
  90. SpaceBeforeParens: ControlStatements
  91. SpaceBeforeRangeBasedForLoopColon: true
  92. SpaceInEmptyParentheses: false
  93. SpacesBeforeTrailingComments: 1
  94. SpacesInAngles: false
  95. SpacesInCStyleCastParentheses: false
  96. SpacesInContainerLiterals: false
  97. SpacesInParentheses: false
  98. SpacesInSquareBrackets: false
  99. StatementMacros:
  100. - 'Q_OBJECT'
  101. TabWidth: 8
  102. TypenameMacros:
  103. - 'DARRAY'
  104. UseTab: ForContinuationAndIndentation
  105. ---
  106. Language: ObjC
  107. AccessModifierOffset: 2
  108. AlignArrayOfStructures: Right
  109. AlignConsecutiveAssignments: None
  110. AlignConsecutiveBitFields: None
  111. AlignConsecutiveDeclarations: None
  112. AlignConsecutiveMacros:
  113. Enabled: true
  114. AcrossEmptyLines: false
  115. AcrossComments: true
  116. AllowShortBlocksOnASingleLine: Never
  117. AllowShortEnumsOnASingleLine: false
  118. AllowShortFunctionsOnASingleLine: Empty
  119. AllowShortIfStatementsOnASingleLine: Never
  120. AllowShortLambdasOnASingleLine: None
  121. AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge']
  122. BitFieldColonSpacing: Both
  123. #BreakBeforeBraces: Webkit
  124. BreakBeforeBraces: Custom
  125. BraceWrapping:
  126. AfterCaseLabel: false
  127. AfterClass: true
  128. AfterControlStatement: Never
  129. AfterEnum: false
  130. AfterFunction: true
  131. AfterNamespace: false
  132. AfterObjCDeclaration: false
  133. AfterStruct: false
  134. AfterUnion: false
  135. AfterExternBlock: false
  136. BeforeCatch: false
  137. BeforeElse: false
  138. BeforeLambdaBody: false
  139. BeforeWhile: false
  140. IndentBraces: false
  141. SplitEmptyFunction: false
  142. SplitEmptyRecord: false
  143. SplitEmptyNamespace: true
  144. BreakAfterAttributes: Never
  145. BreakArrays: false
  146. BreakBeforeConceptDeclarations: Allowed
  147. BreakBeforeInlineASMColon: OnlyMultiline
  148. BreakConstructorInitializers: AfterColon
  149. BreakInheritanceList: AfterComma
  150. ColumnLimit: 120
  151. ConstructorInitializerIndentWidth: 4
  152. ContinuationIndentWidth: 4
  153. EmptyLineAfterAccessModifier: Never
  154. EmptyLineBeforeAccessModifier: LogicalBlock
  155. ExperimentalAutoDetectBinPacking: false
  156. FixNamespaceComments: true
  157. IndentAccessModifiers: false
  158. IndentCaseBlocks: false
  159. IndentCaseLabels: true
  160. IndentExternBlock: Indent
  161. IndentGotoLabels: false
  162. IndentRequiresClause: true
  163. IndentWidth: 4
  164. IndentWrappedFunctionNames: true
  165. InsertBraces: false
  166. InsertNewlineAtEOF: true
  167. KeepEmptyLinesAtTheStartOfBlocks: false
  168. LambdaBodyIndentation: Signature
  169. NamespaceIndentation: All
  170. ObjCBinPackProtocolList: Auto
  171. ObjCBlockIndentWidth: 4
  172. ObjCBreakBeforeNestedBlockParam: false
  173. ObjCSpaceAfterProperty: true
  174. ObjCSpaceBeforeProtocolList: true
  175. PPIndentWidth: -1
  176. PackConstructorInitializers: NextLine
  177. QualifierAlignment: Leave
  178. ReferenceAlignment: Right
  179. RemoveSemicolon: false
  180. RequiresClausePosition: WithPreceding
  181. RequiresExpressionIndentation: OuterScope
  182. SeparateDefinitionBlocks: Leave
  183. ShortNamespaceLines: 1
  184. SortIncludes: false
  185. #SortUsingDeclarations: LexicographicNumeric
  186. SortUsingDeclarations: true
  187. SpaceAfterCStyleCast: true
  188. SpaceAfterLogicalNot: false
  189. SpaceAroundPointerQualifiers: Default
  190. SpaceBeforeCaseColon: false
  191. SpaceBeforeCpp11BracedList: true
  192. SpaceBeforeCtorInitializerColon: true
  193. SpaceBeforeInheritanceColon: true
  194. SpaceBeforeParens: ControlStatements
  195. SpaceBeforeRangeBasedForLoopColon: true
  196. SpaceBeforeSquareBrackets: false
  197. SpaceInEmptyBlock: false
  198. SpaceInEmptyParentheses: false
  199. SpacesBeforeTrailingComments: 2
  200. SpacesInConditionalStatement: false
  201. SpacesInLineCommentPrefix:
  202. Minimum: 1
  203. Maximum: -1
  204. Standard: c++17
  205. TabWidth: 4
  206. UseTab: Never