Enforce assembly-level guidelines over the codebase, so that violating them by any developer (I'm thinking about Junior devs mainly) will break the build (at unit-test level). The guidelines are to be expressed in some simple and yet non intrusive way (NDepend does not fit here). Samples:
- Do not mark any complex classes or methods with NoCodeCoverageAttribute (complex classes have large cyclomatic complexity index)
- If a unit test method does not have any assertion and it does not throw exceptions, something must be going wrong in there.
- Classes in library A can have dependencies only on B and C
- If some class from D namespace is referenced in method B, then it should have execution time less, than 500ms
- Attribute B is a marker only for classes inheriting from C. Any other use is an error
These rules could be expressed in the assembly (rules for the usage of this assembly) and be applied to any other assembly (basically, checking, whether the second lib is sticking to some high-level guidelines)
C#, VS2008, CC.NET, NUnit
PS: I simply do not have time to write this one with Mono.Cecil+Boo