wiesnerbernard/PolyDup Code Duplicate Detector
Detect duplicate code across multiple languages in your Pull Requests
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| threshold | Minimum code block size in tokens (default: 50) | no | 50 |
| similarity | Similarity threshold between 0.0 and 1.0 (default: 0.85) | no | 0.85 |
| fail-on-duplicates | Fail the check if duplicates are found (default: true) | no | true |
| format | Output format: text or json (default: text) | no | text |
| base-ref | Base git reference for comparison (default: auto-detect from PR) | no | "" |
| github-token | GitHub token for commenting on PRs (default: github.token) | no | ${{ github.token }} |
| comment-on-pr | Post results as PR comment (default: true) | no | true |
| polydup-version | Version of polydup to install (default: latest) | no | latest |
| working-directory | Working directory for scanning (default: .) | no | . |
| scan-mode | Scan mode: git-diff (changed files with cached hash lookup) or full (all files) | no | git-diff |
Outputs
| name | description |
|---|---|
| duplicates-found | Number of duplicate code blocks found |
| files-scanned | Number of files scanned |
| exit-code | Exit code from polydup scan (0 = no duplicates, 1 = duplicates found, 2 = error) |