.clang-format 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. IncludeBlocks: Preserve
  60. IndentCaseLabels: false
  61. IndentPPDirectives: None
  62. IndentWidth: 8
  63. IndentWrappedFunctionNames: false
  64. KeepEmptyLinesAtTheStartOfBlocks: true
  65. MaxEmptyLinesToKeep: 1
  66. NamespaceIndentation: None
  67. #ObjCBinPackProtocolList: Auto # requires clang-format 7
  68. ObjCBlockIndentWidth: 8
  69. ObjCSpaceAfterProperty: true
  70. ObjCSpaceBeforeProtocolList: true
  71. PenaltyBreakAssignment: 10
  72. PenaltyBreakBeforeFirstCallParameter: 30
  73. PenaltyBreakComment: 10
  74. PenaltyBreakFirstLessLess: 0
  75. PenaltyBreakString: 10
  76. PenaltyExcessCharacter: 100
  77. PenaltyReturnTypeOnItsOwnLine: 60
  78. PointerAlignment: Right
  79. ReflowComments: false
  80. SortIncludes: false
  81. SortUsingDeclarations: false
  82. SpaceAfterCStyleCast: false
  83. #SpaceAfterLogicalNot: false # requires clang-format 9
  84. SpaceAfterTemplateKeyword: false
  85. SpaceBeforeAssignmentOperators: true
  86. #SpaceBeforeCtorInitializerColon: true # requires clang-format 7
  87. #SpaceBeforeInheritanceColon: true # requires clang-format 7
  88. SpaceBeforeParens: ControlStatements
  89. #SpaceBeforeRangeBasedForLoopColon: true # requires clang-format 7
  90. SpaceInEmptyParentheses: false
  91. SpacesBeforeTrailingComments: 1
  92. SpacesInAngles: false
  93. SpacesInCStyleCastParentheses: false
  94. SpacesInContainerLiterals: false
  95. SpacesInParentheses: false
  96. SpacesInSquareBrackets: false
  97. #StatementMacros: # requires clang-format 8
  98. # - 'Q_OBJECT'
  99. TabWidth: 8
  100. #TypenameMacros: # requires clang-format 9
  101. # - 'DARRAY'
  102. UseTab: ForContinuationAndIndentation
  103. ---
  104. Language: ObjC