views:

987

answers:

3

Throughout or C# sourcecode we have a lot of comments that miss the actual content such like this:

/// <summary>
/// </summary>

or this:

/// <summary>
///
/// </summary>

or this:

/// <param Name="flag"></param>

Unfortunately Visual Studio does not generate warnings for this type of missing comments. But for us it would be nice if we could just klick on an item in a list (eg. the warings list) inside visual studio and then be taken to the faulty location in source code to correct it. Also it would be nice to see the list of missing xml comment content upon each build of the xml files. Do you have any idea on how to achieve this?

+1  A: 

FxCop and a custom rule?

bob
+5  A: 

Try XML Comment Checker:

XML Comment Checker is an application that will check the XML documentation for a .Net assembly for omissions. It offers a more comprehensive checking than the C# compiler itself, and is ideal for when you wish to check your comments before compiling them into real documentation, e.g using Microsoft Sandcastle.

From the feature list:

Check for empty sections. Optionally, XML Comment Checker will warn if any of the required sections or elements are present, but empty. This is not enabled by default

Usage from Visual Studio:

XML Comment Checker can be set as the post-build event in Visual Studio to check an assembly automatically. The warnings emitted by XML Comment Checker have been formatted so that Visual Studio will recognize them and display them in the Error List. An example post-build command line: "PathToCommentChecker\CommentChecker.exe" "$(TargetPath)" -nologo -warnemptysections

xsl
Allthough the messages appear in the Warings List in Visual Studio it is not possible to click on a waring to jump to the source code location.
bitbonk
It can't do that because XML Commentchecker uses the Assembly and the generated XML documentfile and not the original source code.
bitbonk
A: 

ReSharper is the answer to this (any many other) shortcoming of Visual Studio. I have nothing but pity for anyone who does not use it. ;)

bitbonk