views:

26

answers:

2

i have noticed a number of empty method and class summary sections throughout a solution. It's rather large, hundreds of files/classes in a dozen projects. The empty summaries look something like this:

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

My question is: How do i form a regex expression in the Visual Studio file search to find all of the empty summaries in my solution?

Thanks!

+1  A: 

No need to get your hands dirty - just use MS StyleCop. It's free, checks (among many other things) exactly what you need and gives a detailed report about it.

HTH!

Thomas Weller
Awesome idea, thanks! i already had Style Cop installed, never thought to see if it would do "the dirty work".
Paul Sasik
A: 
^[ \t]*/// \<summary\>\n[ \t]*/// \</summary\>

if you type, watch the spaces. There are 4: before every \t and before every \<

If you want to allow space after the first line, the regexp becomes:

^[ \t]*/// \<summary\>[ \t]*\n[ \t]*/// \</summary\>

but msstylecop may be better, i don't know it yet ;-)