有没有办法定义如何使用 Resharper (6)“清理”注释?我没有找到解决这个问题的方法。
代码清理之前:
/// <summary>
/// This is a comment.
/// </summary>
public class MyClass
{
... <not yet cleaned code is here>
}
代码清理后:
/// <summary>
/// This is a comment.
/// </summary>
public class MyClass
{
... <cleaned code is here>
}
想要的结果:
/// <summary>
/// This is a comment.
/// </summary>
public class MyClass
{
... <cleaned code is here>
}
备注:我不想禁用单个类的清理等。我只想更改意外添加的注释中的缩进。
我找到了一个解决方案(使用ReSharper 6.1.1000.8.2)。
打开菜单:ReSharper->选项->代码编辑->代码清理->(选择配置文件,需要是用户定义的配置文件)->C#->禁用重新格式化嵌入的XML文档注释
这似乎是 ReSharper 6.1 中的一个新复选框!?
此解决方案不会设置缩进,但会禁用注释重新格式化。因此,您必须自己清理注释,但 ReSharper 不再更改它们(使用错误的缩进)。
我希望 JetBrains 在下一个版本中添加一个选项来支持单独设置缩进。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)