I suggest you ...

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.

74 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Nicole CalinoiuNicole Calinoiu shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Arunkumar VRArunkumar VR commented  ·   ·  Flag as inappropriate

        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.

      • jophyjophy commented  ·   ·  Flag as inappropriate

        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 CalinoiuNicole Calinoiu commented  ·   ·  Flag as inappropriate

        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.

      • AlexAlex commented  ·   ·  Flag as inappropriate

        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.

      Feedback and Knowledge Base