开发者

VS2010 Code Analysis - Export/Print all checked and unchecked rules for a project

Is it possible to obtain a report (export or print) of all the selected rules active for a c# project?

I am able to open the .ruleset file and check/uncheck the specific rules, however, I can seem to print the list or o开发者_JS百科btain any output from this screen at all.

Failing the ability to print the list of rules active, is there a list of all the stock VS2010 rules? I can take this and remove any that are disabled.


The easiest way I found was to get the list of rules and edit out the rules that are not being enforced.


The .ruleset file is just an XML file. It can be formatted using XSLT if you like, or simply imported into Excel for more manual "massaging" if you prefer.

If you need to map the rule CheckId values to their names, you can extract the rule resource XML from the rule DLLs. For example, the descriptions of the naming rules are in an embedded resource named Microsoft.FxCop.Rules.Naming.NamingRules.xml in the [Visual Studio]\Team Tools\Static Analysis Tools\FxCop\Rules\NamingRules.dll file.

If you think that the .ruleset file should be printable via Visual Studio, you may want to consider adding a suggestion at http://visualstudio.uservoice.com/forums/121579-visual-studio.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜