Checking Visual Studio files for code comments

I'm looking for a Visual Studio 2008 add-in or macro that will check all .cs files and report "code comment coverage". Our company's standard is that all C # classes, methods and properties are code comments. I have a great solution and it takes a lot of time manually going through the files. If I had a report that told me which files have code comments and which ones do not, I could only examine those files.

I don't mind writing code for this, but I don't want to reinvent the wheel. Is there an add-on or macro that does this? Otherwise, is there a way to use reflection or the System.CodeDom namespace to check the class for code comments? If I could just load my classes into the object model, I could probably do the rest.

+2


source to share


2 answers


StyleCop validates XML documentation for classes and class members.



+5


source


Just enable XML documentation in your project build settings, then enable "all warnings as errors". You will now get errors for any undocumented classes and members that are not private or internal.

The Ghost Doc extension for Visual Studio is great for reducing typing effort and is free.



Sandcastle Help File Builder is the easiest way to transfer all this documentation effort into beautiful HTML, CHM or HxS files.

One last great thing: maybe code regions of reference that will be included as examples in your documentation. Reload these unit tests as documentation and make sure the samples are correct: two birds with one stone! :-)

+5


source







All Articles