.clang-format 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # please use clang-format version 8 or later
  2. Standard: Cpp11
  3. AccessModifierOffset: -8
  4. AlignAfterOpenBracket: Align
  5. AlignConsecutiveAssignments: false
  6. AlignConsecutiveDeclarations: false
  7. AlignEscapedNewlines: Left
  8. AlignOperands: true
  9. AlignTrailingComments: true
  10. #AllowAllArgumentsOnNextLine: false # requires clang-format 9
  11. #AllowAllConstructorInitializersOnNextLine: false # requires clang-format 9
  12. AllowAllParametersOfDeclarationOnNextLine: false
  13. AllowShortBlocksOnASingleLine: false
  14. AllowShortCaseLabelsOnASingleLine: false
  15. AllowShortFunctionsOnASingleLine: Inline
  16. AllowShortIfStatementsOnASingleLine: false
  17. #AllowShortLambdasOnASingleLine: Inline # requires clang-format 9
  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: 80
  47. CompactNamespaces: false
  48. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  49. ConstructorInitializerIndentWidth: 8
  50. ContinuationIndentWidth: 8
  51. Cpp11BracedListStyle: true
  52. DerivePointerAlignment: false
  53. DisableFormat: false
  54. FixNamespaceComments: false
  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 # requires clang-format 7
  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 # requires clang-format 9
  85. SpaceAfterTemplateKeyword: false
  86. SpaceBeforeAssignmentOperators: true
  87. #SpaceBeforeCtorInitializerColon: true # requires clang-format 7
  88. #SpaceBeforeInheritanceColon: true # requires clang-format 7
  89. SpaceBeforeParens: ControlStatements
  90. #SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7
  91. SpaceInEmptyParentheses: false
  92. SpacesBeforeTrailingComments: 1
  93. SpacesInAngles: false
  94. SpacesInCStyleCastParentheses: false
  95. SpacesInContainerLiterals: false
  96. SpacesInParentheses: false
  97. SpacesInSquareBrackets: false
  98. #StatementMacros: # requires clang-format 8
  99. # - 'Q_OBJECT'
  100. TabWidth: 8
  101. #TypenameMacros: # requires clang-format 9
  102. # - 'DARRAY'
  103. UseTab: ForContinuationAndIndentation
  104. ---
  105. Language: ObjC