astubbs/Duplicate Code Cross-Check
Detect duplicate code using PMD CPD + jscpd with base-vs-PR comparison
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Apr 20, 2026
- License
- Apache 2.0
Pinned Snippet
uses: astubbs/duplicate-code-cross-check@d3140ef6e9a4adf68c9f729a789e8b7ec8d058f7 # v1.0.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | GitHub token for posting PR comments and review annotations | yes | — |
| directories | Space-separated list of directories to scan | yes | — |
| file-extensions | Comma-separated file extensions for percentage calculation (or "auto" to detect from files) | no | auto |
| cpd-language | PMD CPD language - java, python, kotlin, cpp, csharp, go, javascript, typescript, ruby, scala, etc. (or "auto" to detect from files) | no | auto |
| cpd-min-tokens | PMD CPD minimum token count to flag as a clone | no | 70 |
| cpd-max-duplication | PMD CPD fails if total duplication exceeds this percentage | no | 5 |
| cpd-max-increase | PMD CPD fails if duplication increases vs base branch by more than this percentage | no | 0.1 |
| jscpd-file-pattern | jscpd glob pattern for files to scan (or "auto" to detect from files) | no | auto |
| jscpd-ignore-pattern | jscpd comma-separated glob patterns to ignore | no | **/target/**,**/node_modules/**,**/build/**,**/dist/**,**/__pycache__/**,**/vendor/**,**/.venv/**,**/.next/**,**/.output/**,**/.nuxt/**,**/*.egg-info/**,**/out/**,**/.git/** |
| jscpd-min-lines | jscpd minimum line count to flag as a clone | no | 6 |
| jscpd-min-tokens | jscpd minimum token count to flag as a clone | no | 70 |
| jscpd-max-duplication | jscpd fails if total duplication exceeds this percentage | no | 4 |
| jscpd-max-increase | jscpd fails if duplication increases vs base branch by more than this percentage | no | 0.1 |
| pmd-version | PMD version to install | no | 7.9.0 |
Outputs
no outputs