开发者

Configure FxCop in Visual Studio 2008 to run a subset of rules

I've set up FxCop 1.36 as an external tool in Visual Studio 2008, run it on a project and received a ridiculous number of messages. I can't deal with all those warnings so I'd like to concentrate only on a subset of the warnings. Is it possible to configure FxCo开发者_如何学Cp to only look for, or only show performance warnings?


The FxCop application can be configured based on rules. When you start the app, you should see two tabs. The first shows the list of assemblies you are analyzing. The second shows the list of available rules. Simply de-select the rules you do not wish to run.

If you are automating the process, you can create a new FxCop project and save your rule selections. This will let you rerun those particular rules each time.


Turns out it's pretty simple actually. There are two ways that I've found to specify which rule sets to run in Visual Studio. Check out the FxCop arguments in the External Tools dialog.

Change the /rule: argument to point at a specific dll within the rules directory

Or

Create an FxCop project with the appropriate rules selected as Pedro suggested and point to this with the /project: argument

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜