使用代码清理时,禁用/自定义Resharper中的注释(重新)格式

Bea*_*ker 3 resharper

有没有办法定义如何使用Resharper(6)"清理"注释?我没有找到解决这个问题的方法.

在代码清理之前:

/// <summary>
/// This is a comment.
/// </summary>
public class MyClass
{
   ... <not yet cleaned code is here>
}
Run Code Online (Sandbox Code Playgroud)

代码清理后:

/// <summary>
///   This is a comment.
/// </summary>
public class MyClass
{
   ... <cleaned code is here>
}
Run Code Online (Sandbox Code Playgroud)

通缉结果:

/// <summary>
/// This is a comment.
/// </summary>
public class MyClass
{
   ... <cleaned code is here>
}
Run Code Online (Sandbox Code Playgroud)

备注:我不想为单个类等禁用清理.我只想更改意外添加的注释中的缩进.

Bea*_*ker 5

我找到了一个解决方案(使用ReSharper 6.1.1000.8.2).

打开菜单:ReSharper-> Options-> Code Editing-> Code Cleanup - >(选择配置文件,需要是用户定义的配置文件) - > C# - >禁用重新格式化嵌入式XML文档注释

这似乎是ReSharper 6.1中的一个新复选框!?

此解决方案不会设置缩进,但会禁用注释重新格式化.因此,您必须自己清理注释,但ReSharper不再更改它们(使用错误的缩进).

我希望,JetBrains将添加一个选项,支持在下一个版本中单独设置缩进.