config.clang-format 2.5 KB

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