Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper Settings for spacing in XML comments with attributes

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

like image 716
Metro Smurf Avatar asked Aug 19 '11 13:08

Metro Smurf


2 Answers

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

like image 162
Dmitriy Dokshin Avatar answered Oct 09 '22 08:10

Dmitriy Dokshin


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

like image 27
Russ Clarke Avatar answered Oct 09 '22 10:10

Russ Clarke