Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top