Code Review: How to Stop Programmers Using Specific Namespaces / Functionality

I am working on a project with approx. 20 developers.

One thing we find is that it's hard to keep up with the code review.

We automate something, for example, check the complexity of the code, find empty catch blocks, etc.

Other things are a bit more complicated.

For example, in our case, no data should be stored in session state. Is it possible to block it or get a warning if this was done?

+5
source share
4 answers

NDepend is your friend for this.

( ), CQL (NDepend, ), , :

WARN IF Count > 0 IN SELECT METHODS WHERE IsDirectlyUsing "System.Xml.XmlWriter"

( , - XmlWriter)

+8

FxCop . , TFS, . , , - ! TFS, , .

+3

#/visual studio, , .

AOP .

And, of course, you can always run grep against the code base to find suspicious lines in the code.

+1
source

You need to use something like FxCop.

0
source

All Articles