.clang-format 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # SPDX-FileCopyrightText: 2016 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
  2. # SPDX-License-Identifier: GPL-2.0-or-later
  3. ---
  4. Language: Cpp
  5. # BasedOnStyle: LLVM
  6. AccessModifierOffset: -4
  7. AlignAfterOpenBracket: Align
  8. AlignConsecutiveAssignments: false
  9. AlignConsecutiveDeclarations: false
  10. AlignEscapedNewlinesLeft: false
  11. AlignOperands: true
  12. AlignTrailingComments: true
  13. AllowAllParametersOfDeclarationOnNextLine: true
  14. AllowShortBlocksOnASingleLine: false
  15. AllowShortCaseLabelsOnASingleLine: false
  16. AllowShortFunctionsOnASingleLine: Empty
  17. AllowShortIfStatementsOnASingleLine: false
  18. AllowShortLoopsOnASingleLine: false
  19. AlwaysBreakAfterDefinitionReturnType: None
  20. AlwaysBreakAfterReturnType: None
  21. AlwaysBreakBeforeMultilineStrings: false
  22. AlwaysBreakTemplateDeclarations: true
  23. BinPackArguments: true
  24. BinPackParameters: true
  25. BraceWrapping:
  26. AfterClass: false
  27. AfterControlStatement: false
  28. AfterEnum: false
  29. AfterFunction: false
  30. AfterNamespace: false
  31. AfterObjCDeclaration: false
  32. AfterStruct: false
  33. AfterUnion: false
  34. BeforeCatch: false
  35. BeforeElse: false
  36. IndentBraces: false
  37. BreakBeforeBinaryOperators: None
  38. BreakBeforeBraces: Attach
  39. BreakBeforeTernaryOperators: true
  40. BreakConstructorInitializersBeforeComma: false
  41. ColumnLimit: 100
  42. CommentPragmas: '^ IWYU pragma:'
  43. ConstructorInitializerAllOnOneLineOrOnePerLine: false
  44. ConstructorInitializerIndentWidth: 4
  45. ContinuationIndentWidth: 4
  46. Cpp11BracedListStyle: true
  47. DerivePointerAlignment: false
  48. DisableFormat: false
  49. ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
  50. IncludeCategories:
  51. - Regex: '^\<[^Q][^/.>]*\>'
  52. Priority: -2
  53. - Regex: '^\<'
  54. Priority: -1
  55. - Regex: '^\"'
  56. Priority: 0
  57. IndentCaseLabels: false
  58. IndentWidth: 4
  59. IndentWrappedFunctionNames: false
  60. KeepEmptyLinesAtTheStartOfBlocks: true
  61. MacroBlockBegin: ''
  62. MacroBlockEnd: ''
  63. MaxEmptyLinesToKeep: 1
  64. NamespaceIndentation: None
  65. ObjCBlockIndentWidth: 2
  66. ObjCSpaceAfterProperty: false
  67. ObjCSpaceBeforeProtocolList: true
  68. PenaltyBreakBeforeFirstCallParameter: 19
  69. PenaltyBreakComment: 300
  70. PenaltyBreakFirstLessLess: 120
  71. PenaltyBreakString: 1000
  72. PenaltyExcessCharacter: 1000000
  73. PenaltyReturnTypeOnItsOwnLine: 150
  74. PointerAlignment: Left
  75. ReflowComments: true
  76. SortIncludes: true
  77. SpaceAfterCStyleCast: false
  78. SpaceBeforeAssignmentOperators: true
  79. SpaceBeforeParens: ControlStatements
  80. SpaceInEmptyParentheses: false
  81. SpacesBeforeTrailingComments: 1
  82. SpacesInAngles: false
  83. SpacesInContainerLiterals: true
  84. SpacesInCStyleCastParentheses: false
  85. SpacesInParentheses: false
  86. SpacesInSquareBrackets: false
  87. Standard: Cpp11
  88. TabWidth: 4
  89. UseTab: Never
  90. ...