baryshevrs/clone-alert
PMD CPD-compatible copy-paste detector for TS, JS, JSX/TSX, Vue, Svelte & Angular, with SARIF Code Scanning upload.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| paths | Space-separated files/directories to scan. | no | . |
| minimum-tokens | Minimum duplicate token length to report (PMD --minimum-tokens). | no | 100 |
| extensions | Comma-separated list of extensions to scan, overriding defaults (e.g. "ts,tsx,vue"). | no | "" |
| exclude | Comma-separated glob patterns to exclude. | no | "" |
| fail-on-violation | Fail the job (exit 1) when duplicates are found. | no | true |
| upload-sarif | Upload a SARIF report to GitHub Code Scanning (needs security-events: write). | no | true |
| sarif-file | Path of the SARIF file to write. | no | clone-alert.sarif |
| category | Code Scanning category, to keep clone-alert results separate from other tools. | no | clone-alert |
| version | npm version/dist-tag of clone-alert to run (e.g. "latest", "0.4.0"). | no | latest |
| working-directory | Directory to run clone-alert in. | no | . |
Outputs
| name | description |
|---|---|
| exit-code | Raw clone-alert exit code (0 = clean, 4 = duplicates found). |
| sarif-file | Path of the written SARIF file. |