.clang-format 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: WebKit
  4. AccessModifierOffset: -4
  5. AlignAfterOpenBracket: DontAlign
  6. AlignConsecutiveMacros: false
  7. AlignConsecutiveAssignments: false
  8. AlignConsecutiveDeclarations: false
  9. AlignEscapedNewlines: Right
  10. AlignOperands: false
  11. AlignTrailingComments: false
  12. AllowAllArgumentsOnNextLine: true
  13. AllowAllConstructorInitializersOnNextLine: true
  14. AllowAllParametersOfDeclarationOnNextLine: true
  15. AllowShortBlocksOnASingleLine: Empty
  16. AllowShortCaseLabelsOnASingleLine: false
  17. AllowShortFunctionsOnASingleLine: All
  18. AllowShortLambdasOnASingleLine: All
  19. AllowShortIfStatementsOnASingleLine: Never
  20. AllowShortLoopsOnASingleLine: false
  21. AlwaysBreakAfterDefinitionReturnType: None
  22. AlwaysBreakAfterReturnType: None
  23. AlwaysBreakBeforeMultilineStrings: false
  24. AlwaysBreakTemplateDeclarations: MultiLine
  25. BinPackArguments: true
  26. BinPackParameters: true
  27. BraceWrapping:
  28. AfterCaseLabel: false
  29. AfterClass: false
  30. AfterControlStatement: false
  31. AfterEnum: false
  32. AfterFunction: true
  33. AfterNamespace: false
  34. AfterObjCDeclaration: false
  35. AfterStruct: false
  36. AfterUnion: false
  37. AfterExternBlock: false
  38. BeforeCatch: false
  39. BeforeElse: false
  40. IndentBraces: false
  41. SplitEmptyFunction: true
  42. SplitEmptyRecord: true
  43. SplitEmptyNamespace: true
  44. BreakBeforeBinaryOperators: All
  45. BreakBeforeBraces: WebKit
  46. BreakBeforeInheritanceComma: false
  47. BreakInheritanceList: BeforeColon
  48. BreakBeforeTernaryOperators: true
  49. BreakConstructorInitializersBeforeComma: false
  50. BreakConstructorInitializers: BeforeComma
  51. BreakAfterJavaFieldAnnotations: false
  52. BreakStringLiterals: true
  53. ColumnLimit: 0
  54. CommentPragmas: '^ IWYU pragma:'
  55. CompactNamespaces: false
  56. ConstructorInitializerAllOnOneLineOrOnePerLine: false
  57. ConstructorInitializerIndentWidth: 4
  58. ContinuationIndentWidth: 4
  59. Cpp11BracedListStyle: false
  60. DeriveLineEnding: true
  61. DerivePointerAlignment: false
  62. DisableFormat: false
  63. ExperimentalAutoDetectBinPacking: false
  64. FixNamespaceComments: false
  65. ForEachMacros:
  66. - foreach
  67. - Q_FOREACH
  68. - BOOST_FOREACH
  69. IncludeBlocks: Preserve
  70. IncludeCategories:
  71. - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
  72. Priority: 2
  73. SortPriority: 0
  74. - Regex: '^(<|"(gtest|gmock|isl|json)/)'
  75. Priority: 3
  76. SortPriority: 0
  77. - Regex: '.*'
  78. Priority: 1
  79. SortPriority: 0
  80. IncludeIsMainRegex: '(Test)?$'
  81. IncludeIsMainSourceRegex: ''
  82. IndentCaseLabels: false
  83. IndentGotoLabels: true
  84. IndentPPDirectives: None
  85. IndentWidth: 4
  86. IndentWrappedFunctionNames: false
  87. JavaScriptQuotes: Leave
  88. JavaScriptWrapImports: true
  89. KeepEmptyLinesAtTheStartOfBlocks: true
  90. MacroBlockBegin: ''
  91. MacroBlockEnd: ''
  92. MaxEmptyLinesToKeep: 1
  93. NamespaceIndentation: Inner
  94. ObjCBinPackProtocolList: Auto
  95. ObjCBlockIndentWidth: 4
  96. ObjCSpaceAfterProperty: true
  97. ObjCSpaceBeforeProtocolList: true
  98. PenaltyBreakAssignment: 2
  99. PenaltyBreakBeforeFirstCallParameter: 19
  100. PenaltyBreakComment: 300
  101. PenaltyBreakFirstLessLess: 120
  102. PenaltyBreakString: 1000
  103. PenaltyBreakTemplateDeclaration: 10
  104. PenaltyExcessCharacter: 1000000
  105. PenaltyReturnTypeOnItsOwnLine: 60
  106. PointerAlignment: Left
  107. ReflowComments: true
  108. SortIncludes: true
  109. SortUsingDeclarations: true
  110. SpaceAfterCStyleCast: false
  111. SpaceAfterLogicalNot: false
  112. SpaceAfterTemplateKeyword: true
  113. SpaceBeforeAssignmentOperators: true
  114. SpaceBeforeCpp11BracedList: true
  115. SpaceBeforeCtorInitializerColon: true
  116. SpaceBeforeInheritanceColon: true
  117. SpaceBeforeParens: ControlStatements
  118. SpaceBeforeRangeBasedForLoopColon: true
  119. SpaceInEmptyBlock: true
  120. SpaceInEmptyParentheses: false
  121. SpacesBeforeTrailingComments: 1
  122. SpacesInAngles: false
  123. SpacesInConditionalStatement: false
  124. SpacesInContainerLiterals: true
  125. SpacesInCStyleCastParentheses: false
  126. SpacesInParentheses: false
  127. SpacesInSquareBrackets: false
  128. SpaceBeforeSquareBrackets: false
  129. Standard: Latest
  130. StatementMacros:
  131. - Q_UNUSED
  132. - QT_REQUIRE_VERSION
  133. TabWidth: 8
  134. UseCRLF: false
  135. UseTab: Never
  136. ...