10

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...'

2 Answers 2

22

In "ReSharper → Options → Code Editing → XML Doc Comments → Formatting Style → Tag content → Indent inside element that contain text" set "No indent from parent element".

Sign up to request clarification or add additional context in comments.

1 Comment

This is the correct answer - others are red herrings or old (R#6) bugs
4

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".

5 Comments

Full reformat profile doesnt include 'reformat embedded XML doc comments', by default.
So I notice... However, I now made a custom profile and only added that action in it but then running the reformat had no effect...
I was afraid that would be the issue. Since I can get pretty sloppy with my XML doc comments, I'll just live with this annoyance and keep the reformat xml doc comments enabled.
It's a pain but if this is still bothering you, could you not perhaps write a Visual Studio macro that formats xmldoc specifically ?
Don't know if this is version related but @Дмитрий Докшин 's answer (below) is no workaround. It is the correct solution. Question is why the hell is that an option in R#. Why would anyone ever want that indent

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.