OK first some background. I am busy automating our build process. We run a mixture of Vs 2005 and VS 2008 both targeting platform 2.0. We use Nant to do our builds using the MSBUILD task to do the compile and Cruise Control .net to do our CI. Currently we treat all warnings as errors, fail the build if any FxCop rules fail (except a small subset that we disabled), fail the build if Simian detects any code duplication of more than 5 lines across all projects.
I have written NDepend CQL query to enforce a few rules that are hard to implement in FxCop. I want to fail the build if the number of lines in a method/class breach a certain limit. I also want to fail if the cyclomatic complexity of a method is too high.
I can easily run NDepend as part of my build. But I can't get the build to fail if my CQL queries return results > 0
So this is the question:
- Has anybody tried something similar?
- Is there a Nant task that supports this?
- If there is a Nant task that calls NDepend, but doesn't fail the build is the source available so I can add this feature?
Thanks, Stephen