ReSharper 设置带有属性的 XML 注释中的间距
我在 R# 社区论坛上问了这个同样的问题;几天没有听到任何消息。我想我会重新发布。
对于 C#,XML 注释中等号周围的间距的 R# 6 设置在哪里?我已经浏览了 R# 设置中可以找到的所有代码格式化选项,但每当我使用 R# 代码清理工具时,似乎都不会影响下面描述的间距问题。
R# 代码格式化之前:
/// <summary>
/// Writes trace information...
/// </summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object containing....</param>
R# 代码清理格式化之后:
/// <summary>
/// Writes trace information...
/// </summary>
/// <param name = "eventCache">A <see cref = "T:System.Diagnostics.TraceEventCache" /> object containing....</param>
注意“name”和“eventCache”之间等号周围的间距;以及“cref”和“T:System...”之间
I asked this same question on the R# Community Forums; haven't heard anything in a few days. Thought I'd re-post on SO.
Where is the R# 6 setting for the spacing in XML comments around the equal sign for C#? I've gone through all the code formatting options I could find in the R# settings, but none seem to be affecting the spacing issue described below whenever I use the R# code-cleanup tool.
Before R# code formatting:
/// <summary>
/// Writes trace information...
/// </summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object containing....</param>
After R# code clean-up formatting:
/// <summary>
/// Writes trace information...
/// </summary>
/// <param name = "eventCache">A <see cref = "T:System.Diagnostics.TraceEventCache" /> object containing....</param>
Notice the spacing around the equal sign between 'name' and 'eventCache'; and between 'cref' and 'T:System...'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在“ReSharper → 选项 → 代码编辑 → XML 文档注释 → 格式设置样式 → 标签内容 → 包含文本的元素内部缩进”中设置“父元素无缩进”。
In "ReSharper → Options → Code Editing → XML Doc Comments → Formatting Style → Tag content → Indent inside element that contain text" set "No indent from parent element".
这早在 2009 年 10 月的 resharper 5 中就被报告为一个错误,而且它特别令人恼火,因为不同的人发生的情况不同。
当前的解决方法是创建一个新的代码清理配置文件并取消选择“重新格式化嵌入的 XML 文档注释”。
This was reported as a bug, as far back as resharper 5 in October 2009, and it's especially irritating as it happens differently for different people.
The work around currently is to create a new Code Cleanup profile and de-select "Reformat embedded XML doc comments".