I’ve been running NDepend over some of my projects recently and have noticed a tendency for it to pick up on things in code generated by Visual Studio (which admittedly is of highly variable quality). I’m not going to write my own version of the generated code but I would like to clear out the noise. You can do so by editing the CQL and adding something like:

AND

!FullNameLike ".*Properties.Resources.*"

This criteria excludes anything that matches the common pattern of the standard resource files produced by Visual Studio. You can substitute your own regular expression (just be careful not to exclude your own types) .

This is mainly a post so I don’t have to work out how to do this again. Hopefully someone will either point out where the option to exclude this generated code is in NDepend or add such a feature to the next version.