config.clang-format 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. # NB: BraceWrapping has no effect unless BreakBeforeBraces is set to Custom
  51. BraceWrapping:
  52. AfterClass: false
  53. AfterControlStatement: false
  54. AfterEnum: false
  55. AfterFunction: false
  56. AfterNamespace: false
  57. AfterObjCDeclaration: false
  58. AfterStruct: false
  59. AfterUnion: false
  60. BeforeCatch: false
  61. BeforeElse: false
  62. IndentBraces: true
  63. SpacesInParentheses: false
  64. SpacesInAngles: false
  65. SpaceInEmptyParentheses: false
  66. SpacesInCStyleCastParentheses: false
  67. SpacesInContainerLiterals: true
  68. SpaceBeforeAssignmentOperators: true
  69. ContinuationIndentWidth: 4
  70. CommentPragmas: '^ IWYU pragma:'
  71. ForEachMacros: [
  72. foreach,
  73. Q_FOREACH,
  74. BOOST_FOREACH,
  75. # Is not a foreach, but correct formatting is achieved
  76. Y_DEFER
  77. ]
  78. IfMacros: [
  79. with_lock # Is not an if, but correct formatting is achieved
  80. ]
  81. SpaceBeforeParens: ControlStatements
  82. DisableFormat: false
  83. SortIncludes: false
  84. IndentPPDirectives: BeforeHash
  85. SpaceBeforeInheritanceColon: false
  86. NamespaceMacros: [Y_UNIT_TEST_SUITE]
  87. AttributeMacros: [Y_PRINTF_FORMAT, Y_NO_SANITIZE, Y_FORCE_INLINE, Y_NO_INLINE, Y_WARN_UNUSED_RESULT, Y_HIDDEN, Y_PUBLIC, Y_PURE_FUNCTION]
  88. IndentExternBlock: Indent
  89. TypenameMacros: [Y_THREAD, Y_STATIC_THREAD, Y_POD_THREAD, Y_POD_STATIC_THREAD]
  90. SpacesInLineCommentPrefix:
  91. Minimum: 1
  92. Maximum: 1