.clang-format 3.4 KB

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