Cleanup code is indenting class and method comments

Is there an option to disable the indenting of class and method comments?

Before

/// <summary>
/// Test comment
/// <summary>

After a Resharper code cleanup

/// <summary>
///      Test comment
/// <summary>

I use both GhostDoc and Resharper in combination and they comments are created/update in different styles. GhostDoc uses no indents, same as VS but Resharper indents these comments when runing a code cleanup.
As I prefer the GhostDoc/VS style then this is a pain as I have to go back and fix my comments to keep them consistent.

1
3 comments
Avatar
Klaus Luedenscheidt

you can surpress this behavior in the code cleanup options. See "Reformat embedded XML comments" in Resharper / Options / Code Cleanup.

Regards
Klaus

1

Klaus,

Thank you, I've found it.

I, incorrectly as it happens, presumed it would be in with other C# Formatting Style options, more specifically alongside the other comment option of 'Don't indent comments started at first column'.

Colin Blakey

0

Somewhere along the way this capability became directly supported by ReSharper. 

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

2

Please sign in to leave a comment.