Visual Studio 代码分析与 StyleCop + FxCop [英] Visual Studio Code Analysis vs StyleCop + FxCop

查看:51
本文介绍了Visual Studio 代码分析与 StyleCop + FxCop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在 Visual Studio 的项目中使用过 StyleCop + FxCop.但是现在我正在测试Visual Studio Code分析工具,它更容易集成到MSBuild中,我发现这个工具分析了FxCop和StyleCop的一些规则.

I used previously StyleCop + FxCop on my Visual Studio's projects. But now I am testing Visual Studio Code Analysis tool, which is easier to integrate into MSBuild, and I have found that this tools analyses some of the rules of both FxCop and StyleCop.

这个工具是 FxCop 和 StyleCop 的完全替代品还是只是实现了它们的一些规则?

Is this tool a full replacement for both FxCop and StyleCop or does it just implement some of their rules?

推荐答案

Visual Studio 包括 FxCop + 更多.

Visual Studio includes FxCop + more.

来自 FxCop 的开发者博客:

抱歉我的无知,但我认为FxCop 完全独立于VSTS 中的代码分析?更多的具体来说,我假设如果我安装新版本的 FxCop,VSTS不会利用(没有共享代码?)?如果是这种情况,任何想法当这些变化将使它成为VSTS代码分析?谢谢!

Sorry about my ignorance, but I assume FxCop is completely separate from the Code Analysis in VSTS? More specifically, I assume that if I install the new version of FxCop, VSTS will not take advantage (no shared code?)? If this is the case, any idea when these changes will make it into VSTS code analysis? Thanks!

没错,它们是不同的产品,但是他们确实有普通发动机.视觉工作室 2008 SP1已经带有相同的修复程序和分析(再加一点),所以无需更新"视觉带有最新 FxCop 的工作室.

That's correct, they are different products, however they do have a common engine. Visual Studio 2008 SP1 already comes with the same fixes and analysis (plus a little bit more), so there is no need to 'update' Visual Studio with the latest FxCop.

A 开发者博客还给出了每个博客中的确切规则.

A developer blog also gave the exact rules which are in each.

至于 StyleCop,它独立于 VS 代码分析,如 这篇博文,链接到贾德迪亚斯的帖子.

As for StyleCop, it's independent of VS Code Analysis as described in this blog post, which links to Jader Dias' post.

这篇关于Visual Studio 代码分析与 StyleCop + FxCop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆