.clang-format 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. Language: Cpp
  2. AccessModifierOffset: -2
  3. AlignAfterOpenBracket: Align
  4. AlignConsecutiveAssignments: false
  5. AlignConsecutiveDeclarations: false
  6. AlignEscapedNewlines: Left
  7. AlignOperands: true
  8. AlignTrailingComments: true
  9. AllowAllParametersOfDeclarationOnNextLine: false
  10. AllowShortBlocksOnASingleLine: false
  11. AllowShortCaseLabelsOnASingleLine: false
  12. AllowShortFunctionsOnASingleLine: All
  13. AllowShortIfStatementsOnASingleLine: false
  14. AllowShortLoopsOnASingleLine: false
  15. AlwaysBreakAfterReturnType: None
  16. AlwaysBreakBeforeMultilineStrings: false
  17. AlwaysBreakTemplateDeclarations: No
  18. BinPackArguments: true
  19. BinPackParameters: true
  20. BraceWrapping:
  21. AfterCaseLabel: true
  22. AfterClass: true
  23. AfterControlStatement: true
  24. AfterEnum: true
  25. AfterFunction: true
  26. AfterNamespace: true
  27. AfterObjCDeclaration: false
  28. AfterStruct: true
  29. AfterUnion: true
  30. BeforeCatch: true
  31. BeforeElse: true
  32. IndentBraces: false
  33. SplitEmptyFunction: false
  34. SplitEmptyRecord: false
  35. SplitEmptyNamespace: false
  36. BreakBeforeBinaryOperators: All
  37. BreakBeforeBraces: Custom
  38. BreakBeforeInheritanceComma: false
  39. BreakBeforeTernaryOperators: true
  40. BreakConstructorInitializersBeforeComma: false
  41. BreakConstructorInitializers: BeforeComma
  42. BreakAfterJavaFieldAnnotations: false
  43. BreakStringLiterals: true
  44. ColumnLimit: 0
  45. CommentPragmas: '^ IWYU pragma:'
  46. CompactNamespaces: false
  47. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  48. ConstructorInitializerIndentWidth: 2
  49. ContinuationIndentWidth: 0
  50. Cpp11BracedListStyle: true
  51. DerivePointerAlignment: false
  52. DisableFormat: false
  53. ExperimentalAutoDetectBinPacking: false
  54. FixNamespaceComments: true
  55. IncludeCategories:
  56. - Regex: '^<Q.*'
  57. Priority: 300
  58. - Regex: '^<qgs.*'
  59. Priority: 200
  60. - Regex: '<.*'
  61. Priority: 400
  62. - Regex: '^".*'
  63. Priority: 100
  64. - Regex: '.*'
  65. Priority: 1
  66. IncludeIsMainRegex: false
  67. IncludeBlocks: Regroup
  68. IndentAccessModifiers: true
  69. IndentCaseLabels: true
  70. IndentWidth: 2
  71. IndentWrappedFunctionNames: true
  72. JavaScriptQuotes: Leave
  73. JavaScriptWrapImports: true
  74. KeepEmptyLinesAtTheStartOfBlocks: false
  75. # Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between.
  76. MacroBlockBegin: ""
  77. MacroBlockEnd: ""
  78. MaxEmptyLinesToKeep: 2
  79. NamespaceIndentation: All
  80. ObjCBlockIndentWidth: 4
  81. ObjCSpaceAfterProperty: false
  82. ObjCSpaceBeforeProtocolList: true
  83. PenaltyBreakAssignment: 150
  84. PenaltyBreakBeforeFirstCallParameter: 300
  85. PenaltyBreakComment: 500
  86. PenaltyBreakFirstLessLess: 400
  87. PenaltyBreakString: 600
  88. PenaltyExcessCharacter: 50
  89. PenaltyReturnTypeOnItsOwnLine: 300
  90. PointerAlignment: Right
  91. ReflowComments: false
  92. SortIncludes: true
  93. SortUsingDeclarations: true
  94. SpaceAfterCStyleCast: true
  95. SpaceAfterTemplateKeyword: false
  96. SpaceBeforeAssignmentOperators: true
  97. SpaceBeforeCpp11BracedList: true
  98. SpaceBeforeCtorInitializerColon: true
  99. SpaceBeforeInheritanceColon: true
  100. SpaceBeforeParens: ControlStatements
  101. SpaceBeforeRangeBasedForLoopColon: true
  102. SpaceInEmptyParentheses: false
  103. SpacesBeforeTrailingComments: 1
  104. SpacesInAngles: false
  105. SpacesInContainerLiterals: false
  106. SpacesInCStyleCastParentheses: true
  107. SpacesInParentheses: true
  108. SpacesInSquareBrackets: false
  109. Standard: Cpp11
  110. TabWidth: 2
  111. UseTab: Never
  112. ---
  113. Language: Java
  114. TabWidth: 4
  115. IndentWidth: 4
  116. AllowShortBlocksOnASingleLine: false
  117. AllowShortFunctionsOnASingleLine: None