config.clang-format 2.6 KB

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