.clang-format 4.1 KB

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