Awesome Reviewers

Verification · Static analysis · Duplicate code detection

Token clone detection

Report token-identical or near-identical blocks above a size threshold.

How to build it

  1. Run jscpd or PMD CPD with a minimum token count that fits the language.
  2. Exclude tests, generated code and vendored directories from the scan.
  3. Fail the check only on clones that the change introduces.

Signals in a repository

  • .jscpd.json or a cpd task in the build file.
  • Exclude patterns for generated, vendored or test paths in the detector config.
  • Clone reports in CI output with a token threshold setting.

In practice

No scanned repository runs a tool for this check. The steps above are the only guidance.