style cop + resharper control comments
this may seem like a trivial question but when i installed the stylecop plugin for resharper my comments are getting formatted like thi开发者_如何学Pythons
/// <summary>
/// Gets the gift item.
/// </summary>
/// <param name="uid">
/// The uid.
/// </param>
/// <param name="upc">
/// The upc.
/// </param>
/// <returns>
/// </returns>
Gift GetGift(long uid, string upc);
as opposed to
/// <summary>Gets the gift item.</summary>
/// <param name="uid">The uid.</param>
/// <param name="upc">The upc.</param>
/// <returns></returns>
Gift GetGift(long uid, string upc);
I can't seem to find any way to turn this type of formatting off.
If you have the Microsoft Stylecop for Resharper plugin installed in Resharper, Go to Resharper Options, Tools, then StyleCop for Resharper. There you should see a checkbox for Use single lines for declaration headers.
Give GhostDoc a try. This free Visual Studio extension generates even nicer XML doc comments. param
and return
tags are inlined whereas summary
tags remain on separate lines. Perhaps this already suits Your needs.
You can make GhostDoc work if you turn off "Reformat embedded XML doc comments" in your default Code Cleanup settings under the "C#" category. Then under StyleCop section, turn off rule "1611: Element Parameters Must Be Documented" and rule "1618: Generic Type Parameters Must Be Documented". That way code-cleanup won't re-mangle your GhostDoc comments. Bear in mind that Code Cleanup options are solution-specific.
精彩评论