开发者

How to find empty method/class XML summaries in Visual Studio?

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!


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!


^[ \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 ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜