Find duplicate code with jscpd

jscpd is a great tool for finding duplicate pieces of JavaScript (and not only) code. A sample config looks like:

  - "**/node_modules/**"
  - "**/*.js"
min-lines: 8
min-tokens: 80
output: "cpd.xml"

Now running just jscpd will generate cpd.xml. It’s in the CPD format, which makes it a great fit for the DRY plugin in Jenkins.