Exclude compiler generated code by default
Exclude all compiler generated code from all graphs and queries by default. This is very cumbersome when working with Task, async and await for .Net 4.5+
We just released NDepend v6 that now is able to merge compiler generated code into app code, in a smart way that will preserve code metrics, dependencies, difff…
http://www.ndepend.com/ndepend-v6
You can download v6 Release Candidate 1 to try it.
Your feedback at support@ndepend.com will be more than welcome.
You can also re-use your NDepend UserVoice votes for further feature request!
-
Mattias Jansson commented
I strongly support this idea, though my issue is not with graphs.
Just using linq causes the compiler to generate extra types and fields within my type. I can exclude them from JustMyCode with a "notmycode"-rule, but it still affects the various properties within a type (t.Fields, t.NbFields).
A lot of the default quality-related queries has to be re-written to exclude this, e.g. "Types with poor cohesion":
t.NbFields > 10
has to be rewritten as:
t.Fields.Where(f => !f.IsGeneratedByCompiler).Count() > 10