Fork me on GitHub

DupFinder

Code duplication finder built by JetBrains.

https://confluence.jetbrains.com/display/NETCOM/Introducing+dupFinder

Install DupFinder

The best way to install DupFinder is via Chocolatey. Open your command line and type:

choco install resharper-clt.portable

Run DupFinder

C:\ProgramData\chocolatey\lib\resharper-clt.portable\tools\dupfinder.exe /output=dupFinder-report.xml /show-text /exclude=**\*Test.cs; [Your solution file].sln

The report will be save to dupFinder-report.xml

Generate DupFinder badge

BadgesSharpCmd -o [your GitHub username] -r [your GitHub repository] -a %GITHUB_REPO_TOKEN% -b DupFinder -c dupFinder-report.xml

Show the badge at your GitHub repository

Edit your readme.md and add the line below:
![DupFinder](https://badgessharp.apphb.com/badges/:owner/:repo/DupFinder)

How use it on your Continuous Integration?

AppVeyor

Add to your AppVeyor.yml file:

after_build:
        - cmd: >
        C:\ProgramData\chocolatey\lib\resharper-clt.portable\tools\dupfinder.exe /output=dupFinder-report.xml /show-text /exclude=**\*Test.cs; [Your solution file].sln


        BadgesSharpCmd -o [your GitHub username] -r [your GitHub repository] -a %GITHUB_REPO_TOKEN% -b DupFinder -c dupFinder-report.xml

TeamCity

Add the 'DupFinder' step to your configuration (probably you already have it);

Add a final 'Command Line' step to your configuration:

  1. Execute step: Even if some of the previous steps failed
  2. Run: Custom script
  3. Custom script:
    BadgesSharpCmd -o [your GitHub username] -r [your GitHub repository] -a %GITHUB_REPO_TOKEN% -b DupFinder -c "%system.teamcity.build.tempDir%\dupfinder-report-*.xml"