Allow code clone detection to be run from command line and/or MSBuild
The new code clone detection feature seems to be very tightly coupled to the project object model exposed by the IDE. This essentially makes it impossible to use within automated builds. Please consider changing the "innards" so that the tool can be used to break an automated build (including builds run outside the IDE) when duplicate code is found.
Arunkumar VR commented
As an individual developer IDE based code cloning will be sufficient . But with in an enterprise environment, it is really import to have automated Code Clone analysis like code metrics analysis , Static code analysis. It is not a good idea that only Code cloning is left out from the continuous build.
Run Code Clone Analyze from Command prompt is very impotent , because it can be validated in TFS build . just like other Code quality metrics it also improve the code .. i really need it ....
Nicole Calinoiu commented
Alex, just because it _could_ be used to break a build doesn't necessarily mean that this would be the only mode in which it could be run. If it were executable outside the IDE and produced an XML report, both the "any violation" and "any new violation" build breakage scenarios would at least become possible. This simply isn't the case now unless you're willing to automate the IDE as part of your builds.
Nicole, I think this "used to break an automated build when duplicate code is found." won't work. In our solution we have lots of duplicates. It would be really nice if it could return some data regarding duplicates or duplicate index. Automated build compares that index with previous value and if it was increased(or decreased no enough) the build fails. This way we can gradually remove all duplicates.