config.clang-format 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. ObjCSpaceAfterProperty: false
  31. ObjCSpaceBeforeProtocolList: true
  32. PackConstructorInitializers: Never
  33. PenaltyBreakBeforeFirstCallParameter: 19
  34. PenaltyBreakComment: 300
  35. PenaltyBreakString: 1000
  36. PenaltyBreakFirstLessLess: 120
  37. PenaltyExcessCharacter: 1000000
  38. PenaltyReturnTypeOnItsOwnLine: 60
  39. PointerAlignment: Left
  40. SpacesBeforeTrailingComments: 1
  41. SpacesInSquareBrackets: false
  42. Cpp11BracedListStyle: true
  43. Standard: c++20
  44. IndentWidth: 4
  45. TabWidth: 4
  46. UseTab: Never
  47. BreakBeforeBraces: Attach
  48. # NB: BraceWrapping has no effect unless BreakBeforeBraces is set to Custom
  49. BraceWrapping:
  50. AfterClass: false
  51. AfterControlStatement: false
  52. AfterEnum: false
  53. AfterFunction: false
  54. AfterNamespace: false
  55. AfterObjCDeclaration: false
  56. AfterStruct: false
  57. AfterUnion: false
  58. BeforeCatch: false
  59. BeforeElse: false
  60. IndentBraces: true
  61. SpacesInParentheses: false
  62. SpacesInAngles: false
  63. SpaceInEmptyParentheses: false
  64. SpacesInCStyleCastParentheses: false
  65. SpacesInContainerLiterals: true
  66. SpaceBeforeAssignmentOperators: true
  67. ContinuationIndentWidth: 4
  68. CommentPragmas: '^ IWYU pragma:'
  69. ForEachMacros: [
  70. foreach,
  71. Q_FOREACH,
  72. BOOST_FOREACH,
  73. # Is not a foreach, but correct formatting is achieved
  74. Y_DEFER
  75. ]
  76. IfMacros: [
  77. with_lock # Is not an if, but correct formatting is achieved
  78. ]
  79. SpaceBeforeParens: ControlStatements
  80. DisableFormat: false
  81. SortIncludes: false
  82. IndentPPDirectives: BeforeHash
  83. SpaceBeforeInheritanceColon: false
  84. NamespaceMacros: [Y_UNIT_TEST_SUITE]
  85. AttributeMacros: [Y_PRINTF_FORMAT, Y_NO_SANITIZE, Y_FORCE_INLINE, Y_NO_INLINE, Y_WARN_UNUSED_RESULT, Y_HIDDEN, Y_PUBLIC, Y_PURE_FUNCTION]
  86. IndentExternBlock: Indent
  87. TypenameMacros: [Y_THREAD, Y_STATIC_THREAD, Y_POD_THREAD, Y_POD_STATIC_THREAD]
  88. SpacesInLineCommentPrefix:
  89. Minimum: 1
  90. Maximum: 1