FxCop1.36 和失败错误
我正在使用 Apache Ant 运行 FxCop。对于版本 1.36,如果用户未提供所有依赖项信息,分析将返回错误代码,但会创建报告,这可能表明代码库没有问题。
将failonerror设置为true可以修复此问题,但问题是即使错误不是致命的(错误代码1),分析也会失败。这是我面临的问题。我希望仅当返回的错误代码为 1(即致命错误)时分析才会失败(在其他世界中,就像failonerror 为 true 一样)。对于其他错误,我希望继续分析(即好像failonerror设置为false)。
既然这个问题已成为最优先的问题之一,有人可以帮我解决这个问题吗?
提前致谢。
I am running FxCop using Apache Ant. For version 1.36, if all the dependency information are not given by the user, the analysis returns an error code, but a report is created, which might suggest there are no issues with the code base.
Setting failonerror to true fixes this issue, but the problem is that even if the error is not fatal (error code 1), the analysis fails. This is the issue I am facing. I want the analysis to fail only if the returned error code is 1, that is fatal error (In other worlds, act as if failonerror is true). For other errors, I want the analysis to continue (i.e. as if failonerror is set as false).
Can someone please help me with this issue, since this issue has become one of the highest priority ones?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Ant 是否允许查询 FxCop 结果?如果是这样,请将failonerror设置为false,然后添加一个步骤来检查FxCop结果。根据结果,您可以将构建设置为失败。
Does Ant allow you to query the FxCop result? If so, set failonerror to false and then add a step to check the FxCop result afterward. Depending on the result, you can set the build to fail.