比较两个 fxcop 结果

发布于 2024-08-29 00:18:25 字数 80 浏览 2 评论 0原文

我将使用 fxcop 分析同一 dll 的两个不同版本。 我只想显示这两个报告之间的差异。 有谁知道这是否可能?

感谢您抽出时间。

I'm going to analysis two different versions of the same dll with fxcop.
I would like to display only the differences between these two reports.
Does anyone know if this is possible ?

Thanks for your time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

巷子口的你 2024-09-05 00:18:25

是的,这是可能的,但没有可用的内置工具。一种相当简单的方法是使用 diff 工具来比较两个报告。如果结果对您来说太杂乱,另一种方法是使用您自己的工具来比较两个报告的 XML。

Yes, it's possible, but there are no built-in tools available for this. One fairly simple approach would be to use a diff tool to compare the two reports. If the result is too noisy for you, another approach would be to roll your own tool to compare the XML of the two reports.

瞳孔里扚悲伤 2024-09-05 00:18:25

您使用的是 UI 还是命令行?

使用命令行工具,您有多种选择。其中之一是导入旧报告以用作基线。然后将 fxcop 项目设置为仅报告新错误: Report Status="Active, Absent" NewOnly="True"

命令行将如下所示: fxcopcmd.exe /i:OldVersionReport.xml /out:NewVersionReport.xml /p :FXCopProject.fxcop /f:mydll.dll

新报告将仅包含新的活动错误以及旧版本中缺失的 ie 修复错误的列表。

虽然这在大多数情况下都有效,但您需要了解差异不会 100% 准确。 FXCop 尽力将旧报告与新版本的 DLL 进行匹配,但有时会失败。例如,如果您在代码中的某处修复了特定的违规行为,但在其他地方添加了相同类型的违规行为,FXCop 很可能会错过这一点并且不会显示任何差异。

Are you using UI or the command line?

With the command line tool, you have a number of options. One of them is to import an old report to be used as a baseline. Then set the fxcop project to report only new errors: Report Status="Active, Absent" NewOnly="True"

The command line will be something like this: fxcopcmd.exe /i:OldVersionReport.xml /out:NewVersionReport.xml /p:FXCopProject.fxcop /f:mydll.dll

The new report will have only new active error and also a list of missing i.e. fixed errors from the old version.

While this will work for the most part, you need to understand that the difference will not be 100% acurate. FXCop does its best to match old report to the new version of the DLL, but sometimes it fails. For example, if you fixed a particular violation somewhere in code, but added the same type of violation in another place, FXCop will most likely miss this and show no difference.

多孤肩上扛 2024-09-05 00:18:25

对于 FxCop VS 2010,您只需指定 /saveMessagesToReport:Absent 以及旧生成的 FxCop 文件 /import:"OldFile.xml" 即可。
只是一个例如。

     fxcopcmd.exe /import:"c:\Old.xml" /summary "/file:c:\*.dll" 
     /saveMessagesToReport:Absent /out:"c:\Output.xml"

For FxCop VS 2010 , all you need is to have /saveMessagesToReport:Absent along with the older generated FxCop file /import:"OldFile.xml" specified .
Just an eg.

     fxcopcmd.exe /import:"c:\Old.xml" /summary "/file:c:\*.dll" 
     /saveMessagesToReport:Absent /out:"c:\Output.xml"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文