astubbs/Duplicate Code Cross-Check

Detect duplicate code using PMD CPD + jscpd with base-vs-PR comparison

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Apr 20, 2026
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: astubbs/duplicate-code-cross-check@d3140ef6e9a4adf68c9f729a789e8b7ec8d058f7 # v1.0.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github-tokenGitHub token for posting PR comments and review annotationsyes
directoriesSpace-separated list of directories to scanyes
file-extensionsComma-separated file extensions for percentage calculation (or "auto" to detect from files)noauto
cpd-languagePMD CPD language - java, python, kotlin, cpp, csharp, go, javascript, typescript, ruby, scala, etc. (or "auto" to detect from files)noauto
cpd-min-tokensPMD CPD minimum token count to flag as a cloneno70
cpd-max-duplicationPMD CPD fails if total duplication exceeds this percentageno5
cpd-max-increasePMD CPD fails if duplication increases vs base branch by more than this percentageno0.1
jscpd-file-patternjscpd glob pattern for files to scan (or "auto" to detect from files)noauto
jscpd-ignore-patternjscpd comma-separated glob patterns to ignoreno**/target/**,**/node_modules/**,**/build/**,**/dist/**,**/__pycache__/**,**/vendor/**,**/.venv/**,**/.next/**,**/.output/**,**/.nuxt/**,**/*.egg-info/**,**/out/**,**/.git/**
jscpd-min-linesjscpd minimum line count to flag as a cloneno6
jscpd-min-tokensjscpd minimum token count to flag as a cloneno70
jscpd-max-duplicationjscpd fails if total duplication exceeds this percentageno4
jscpd-max-increasejscpd fails if duplication increases vs base branch by more than this percentageno0.1
pmd-versionPMD version to installno7.9.0

no outputs