Using FXCop in your project

How many IT stores use FxCop to write production code? If so, what was / was your overall experience of its implementation in terms of cultural shift, pain points and tangible benefits?

I am in an environment that is somewhat chaotic and looking for tools that help us standardize our development efforts and get us home at a decent hour. I want to avoid the egg on my face in order to put pressure on the static analysis tool so that it fails because it is "not practical." <- (Expected Management Response)

+6
fxcop
source share
2 answers

Please note that FxCop is very customizable regarding the rules you want to apply. You may find that it works best by gradually introducing it; only for a specific set of rules for a specific set of files or initially excluding all obsolete files.

There are mandatory rules that you can never activate, because they simply do not fit your problem domain. And remember that if a piece of code "breaks the rule" for a specific purpose, there is an attribute for marking such code as acceptable, although I would set a rule that all such overrides should use the Justification property for the attribute to indicate why.

Finally, since the built-in rules will greatly help in improving the quality of the code, really big wins must be achieved in user rules that will allow you to check corporate agreements. If you do not automate peer review in this way, then you cannot really guarantee compliance.

I use FxCop as an integrated part of the build system at work, and our shared libraries are currently released with all the rules included with minimal attribute overrides, and this has been useful in more than a few places.

+3
source share

I would say that not many places really use FxCop. We turned it on, but most Dev employees ignore the warnings made.

In addition, Dev Management is not interested in really pushing the warning cleanup here, partly because FxCop really doesn’t like the conventions (variable names, etc.) that management wants us to follow ...

In projects where I was a leader, I ordered him to use, because I think that this helps us become better programmers. But you need to have it at the top to get all developers to follow it.

+3
source share

All Articles