tags:

views:

9

answers:

1

I'm refining the built in dead code query in NDEpend and I'm finding a lot of false positives from standalone programs (i.e. w/ Main() entrypoints).

I noticed that the built in unused types query has this clause:

 !NameIs "Program" AND // Generally, types named Program 
                       // contain a Main() entry-point 
                       // method and this condition avoid 
                       // to consider such type as 
                       // unused code.

Is it impossible to write something like

HasMethodNamed "Main"

instead? That's what I'd really like to select for.

+1  A: 

The HasMethodNamed CQL clause you are mentioning has no semantical equivalent in actual CQL, but major improvement are actually developed and in 2011, what you ask and more will be supported.

Patrick Smacchia - NDepend dev