首页 > 解决方案 > Rehsarper 2018.2.3 Disbale 在摘要和单行注释之间插入新行

问题描述

我找不到正确的设置来禁用在文档标题摘要和代码清理的单行注释之间自动插入新行。

例如我有以下代码:

    /// <summary> The get data from source. </summary>
    /// <returns> The source data. </returns>
    // ReSharper disable once MethodTooLong
    protected override IDictionary<string, Object> GetData()...

清理代码 (CTRL+E+F) 后,结果为:

    /// <summary> The get data from source. </summary>
    /// <returns> The source data. </returns>

    // ReSharper disable once MethodTooLong
    protected override IDictionary<string, Object> GetData()...

如何摆脱自动插入的空行?

标签: resharpersummarycode-cleanup

解决方案


很晚了,但为了未来:

在 Resharper 2018.2.3

Resharper > 选项 > 代码编辑 > C# > 格式化样式 > 空行:声明中的空行:在文件头注释 = 0 之后

由于您也有评论,请确保您有 Resharper > Options > Code Editing > C# > Formatting Style > Blank Lines : General : Before single-line comment = 0


推荐阅读