开发者

How to share FxCop rules amongst all developers?

All our developers are using VS2010 professional so code 开发者_StackOverflow社区analysis is not available. I want them to use FxCop to analyze the code before checking in. I have gone through the rules and disabled a bunch of them and added couple of them. I want all the developers to use same set of rules since it will be the rules used in MSBuild. How do I distribute the rule set to be used in FxCop? What files need to be distributed and where is it supposed to go to?


An alternative or a good complement to FxCop would be to use the commercial tool NDepend. With this tool one can write Code Rule over LINQ Queries (namely CQLinq). Disclaimer: I am one of the developers of the tool

More than 200 code rules are proposed by default, these include design, architecture, code quality, code evolution, naming conventions, dead code, .NET Fx usage...

CQLinq is dedicated to write code rules that can be verified live in Visual Studio, or that can be verified during build process and reported in an HTML/javascript report.

The strength of CQLinq over FxCop, is that it is straightforward to write/customize/share a code rule, and get immediately results. Facilities are proposed to browse matched code elements. Concretely this looks like that:

How to share FxCop rules amongst all developers?


When using stand-alone FxCop, you can create an FxCop project file (with extension .fxcop) which contains the list rules that are to be used in the analysis. (Typically, the file will also include the list of target assemblies, although this is optional.) This file may be checked into source control with your code in order to distribute it to the developers working on the shared code base.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜