Clang-Format метод разрыва и оператор присваивания - PullRequest
0 голосов
/ 06 марта 2020

Я хочу использовать формат clang для форматирования моего C# кода. Первая проблема заключается в том, что мой файл clang начинает новую строку после модификатора доступа, например, publi c.

**public
static class exampleClass**
{
    // Example
}

Вторая проблема заключается в том, что мой файл clang устанавливает пустое место в моем Lambdaoperator => (= >)

 List<string> keys = inner.Properties().Select(p = > p.Name).ToList();

А это мой текущий файл clang


  1. Язык: Cpp
  2. BasedOnStyle: LLVM

  3. AccessModifierOffset: 0
  4. AlignAfterOpenBracket: Align
  5. AlignConsecutiveAssignments: false
  6. AlignConsecutiveDeclarations: false
  7. AlignOperands: true
  8. AlignTrailingComments: true
  9. AllowAllParametersOfDeclarationOnNextLine: true
  10. AllowShortBlocksOnASingleLine: false
  11. AllowShortIfStatementsOnASingleLine: false
  12. AllowShortLoopsOnASingleLine: false
  13. AlwaysBreakAfterDefinitionRet urnType: нет
  14. AlwaysBreakAfterReturnType: нет
  15. AlwaysBreakBeforeMultilineStrings: false
  16. AlwaysBreakTemplateDeclarations: MultiLine
  17. BinPackArguments: true
  18. 1054 *
  19. BraceWrapping:
  20. AfterClass: true
  21. AfterControlStatement: true
  22. AfterEnum: true
  23. AfterFunction: true
  24. AfterNamespace: true
  25. AfterObjCDeclaration: true
  26. AfterStruct: true
  27. AfterUnion: true
  28. AfterExternBlock: true
  29. BeforeCatch: true
  30. BeforeElse: true
  31. IndentBraces: true
  32. SplitEmptyFunction: true
  33. SplitEmptyRecord: true
  34. SplitEmptyNamespace: true
  35. BreakBeforeBinaryOperators None:
  36. BreakBeforeBraces: GNU
  37. BreakBeforeInheritanceComma: false
  38. BreakInheritanceList: BeforeColon
  39. BreakBeforeTernaryOperators: true
  40. BreakCon structorInitializersBeforeComma: false
  41. BreakConstructorInitializers: BeforeColon
  42. BreakAfterJavaFieldАннотации: false
  43. BreakStringLiterals: false
  44. СтолбецLimit: 200
  45. CompactNamespace: false
  46. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  47. ConstructorInitializerIndentWidth: 4
  48. ContinuationIndentWidth: 4
  49. DerivePointerAlignment: false
  50. DisableFormat: false
  51. ExperimentalAutoDetectBinPacking: false
  52. FixNamespaceComments: true
  53. ForEachMacros:
    • 1131 *
    • Q_FOREACH
    • BOOST_FOREACH
  54. IncludeBlocks: Preserve
  55. IncludeCategories:
    • Regex: '^ "(llvm | llvm-c | clang | clang- c) /'
  56. Приоритет: 2
    • Regex: ' ^ (<| "(GTEST | gmock | ISL | json) /)» </li>
  57. Приоритет: 3
    • Регулярное выражение: '. *'
  58. Приоритет: 1
  59. IncludeIsMainRegex: '(Test)? $'
  60. IndentCaseLabels: true
  61. IndentPPDirectives: нет
  62. IndentWidth: 4
  63. IndentWrappedFunctionNames: false
  64. JavaScriptЦитаты: Оставить
  65. JavaScriptWrapImports: true
  66. KeepEmptyLinesAtTheStartOfBlocks: true
  67. MacroBlockBegin: ''
  68. MacroBlockEnd: ''
  69. MaxEmptyLinesToKeep: 1
  70. Отступ пространства имен: Нет
  71. ObjCBinPackProtocolList: Auto
  72. ObjCBlockIndentWidth: 2
  73. ObjCSpaceAfterProperty: false * 11 * * True
  74. PenaltyBreakAssignment: 2
  75. PenaltyBreakBeforeFirstCallParameter: 19
  76. PenaltyBreakComment: 300
  77. PenaltyBreakFirstLessLess: 120
  78. PenaltyBreakString: 1000
  79. Штраф * Урон 120 ураган 10 урока 1000000
  80. PenaltyReturnTypeOnItsOwnLine: 200
  81. PointerAlignment: Right
  82. ReflowComments: true
  83. SortIncludes: true
  84. SortUsingDeclarations: true * 1221 1222 * SpaceAfterCStyleCast: false
  85. SpaceAfterTemplateKeyword: true
  86. SpaceBeforeAssignmentOperators: true
  87. SpaceBeforeCpp11BracedList: false
  88. SpaceBeforeCtorInitializerColion trueColon trueColon: trueColon trueColon: trueColon trueColon: trueColon trueColon: trueColon TrueColone: ​​trueColon TrueColon: trueColon TrueColon: TrueColone: ​​true32Colon: TrueColone: ​​TrueColone: ​​TrueColone: ​​TrueColone: ​​TrueColone: ​​TrueColone
  89. SpaceBeforeParens: ControlStatements
  90. SpaceBeforeRangeBasedForLoopColon: true
  91. SpaceInEmptyParentheses: false
  92. SpacesBeforeTrailingComments: 1
  93. false 12A * SpacesInContainerLiterals: true
  94. Spac esInCStyleCastParentheses: false
  95. SpacesInParentheses: false
  96. SpacesInSquareBrackets: false
  97. Стандарт: Cpp11
  98. StatementMacros:
    • Q_UNUSED
    • QT_REQUIRE_VERSION
  99. TabWidth: 8
  100. UseTab: Никогда
  101. ...
...