config.clang-format 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. Language: Cpp
  2. AccessModifierOffset: -4
  3. ConstructorInitializerIndentWidth: 4
  4. AlignEscapedNewlinesLeft: false
  5. AlignEscapedNewlines: Left
  6. AlignTrailingComments:
  7. Kind: Always
  8. OverEmptyLines: 0
  9. AllowAllParametersOfDeclarationOnNextLine: true
  10. AllowShortBlocksOnASingleLine: false
  11. AllowShortIfStatementsOnASingleLine: false
  12. AllowShortLoopsOnASingleLine: false
  13. AllowShortFunctionsOnASingleLine: None
  14. AlwaysBreakTemplateDeclarations: true
  15. AlwaysBreakBeforeMultilineStrings: false
  16. BreakBeforeBinaryOperators: false
  17. BreakBeforeTernaryOperators: true
  18. BreakConstructorInitializersBeforeComma: true
  19. BinPackParameters: true
  20. ColumnLimit: 0
  21. ConstructorInitializerAllOnOneLineOrOnePerLine: false
  22. DerivePointerAlignment: false
  23. ExperimentalAutoDetectBinPacking: false
  24. IndentCaseLabels: true
  25. IndentWrappedFunctionNames: false
  26. IndentFunctionDeclarationAfterType: false
  27. MaxEmptyLinesToKeep: 1
  28. KeepEmptyLinesAtTheStartOfBlocks: false
  29. NamespaceIndentation: All
  30. FixNamespaceComments: true
  31. ShortNamespaceLines: 0
  32. ObjCSpaceAfterProperty: false
  33. ObjCSpaceBeforeProtocolList: true
  34. PackConstructorInitializers: Never
  35. PenaltyBreakBeforeFirstCallParameter: 19
  36. PenaltyBreakComment: 300
  37. PenaltyBreakString: 1000
  38. PenaltyBreakFirstLessLess: 120
  39. PenaltyExcessCharacter: 1000000
  40. PenaltyReturnTypeOnItsOwnLine: 60
  41. PointerAlignment: Left
  42. SpacesBeforeTrailingComments: 1
  43. SpacesInSquareBrackets: false
  44. Cpp11BracedListStyle: true
  45. Standard: c++20
  46. IndentWidth: 4
  47. TabWidth: 4
  48. UseTab: Never
  49. BreakBeforeBraces: Attach
  50. InsertBraces: true
  51. # NB: BraceWrapping has no effect unless BreakBeforeBraces is set to Custom
  52. BraceWrapping:
  53. AfterClass: false
  54. AfterControlStatement: false
  55. AfterEnum: false
  56. AfterFunction: false
  57. AfterNamespace: false
  58. AfterObjCDeclaration: false
  59. AfterStruct: false
  60. AfterUnion: false
  61. BeforeCatch: false
  62. BeforeElse: false
  63. IndentBraces: true
  64. SpacesInParentheses: false
  65. SpacesInAngles: false
  66. SpaceInEmptyParentheses: false
  67. SpacesInCStyleCastParentheses: false
  68. SpacesInContainerLiterals: true
  69. SpaceBeforeAssignmentOperators: true
  70. ContinuationIndentWidth: 4
  71. CommentPragmas: '^ IWYU pragma:'
  72. ForEachMacros: [
  73. foreach,
  74. Q_FOREACH,
  75. BOOST_FOREACH,
  76. # Is not a foreach, but correct formatting is achieved
  77. Y_DEFER
  78. ]
  79. IfMacros: [
  80. with_lock # Is not an if, but correct formatting is achieved
  81. ]
  82. SpaceBeforeParens: ControlStatements
  83. DisableFormat: false
  84. SortIncludes: false
  85. IndentPPDirectives: BeforeHash
  86. SpaceBeforeInheritanceColon: false
  87. NamespaceMacros: [Y_UNIT_TEST_SUITE]
  88. AttributeMacros: [Y_PRINTF_FORMAT, Y_NO_SANITIZE, Y_FORCE_INLINE, Y_NO_INLINE, Y_WARN_UNUSED_RESULT, Y_HIDDEN, Y_PUBLIC, Y_PURE_FUNCTION]
  89. IndentExternBlock: Indent
  90. TypenameMacros: [Y_THREAD, Y_STATIC_THREAD, Y_POD_THREAD, Y_POD_STATIC_THREAD]
  91. StatementAttributeLikeMacros: [ythrow]
  92. SpacesInLineCommentPrefix:
  93. Minimum: 1
  94. Maximum: 1