kucherenko/jscpd-copy-paste-detector

Copy/paste detector for source code — find duplicated blocks across 223+ languages (Rust v5)

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
pathPaths to scan for duplicates (space-separated)no.
configPath to .jscpd.json config fileno""
min-tokensMinimum number of tokens to consider a duplicateno50
min-linesMinimum number of lines to consider a duplicateno5
max-linesMaximum lines per block to considerno""
modeDetection mode: mild, weak, or strictnomild
formatComma-separated list of file extensions/formats to checkno""
ignoreComma-separated glob patterns to ignoreno""
ignore-patternComma-separated regex patterns to skip matching tokensno""
reportersComma-separated list of reporters (console, json, xml, csv, html, markdown, badge, sarif, ai, xcode, console-full, threshold, silent)noconsole
outputOutput directory for file reportersnoreport
thresholdMaximum duplication percentage before exit 1no""
blameEnrich clones with git blame datanofalse
exit-codeExit with code when duplicates found. Use 'true' for default code 1, or an integer like '2' for a custom codeno""
patternGlob pattern to find files to scanno""
max-sizeSkip files larger than SIZE (e.g. 100kb, 1mb)no""
skip-localSkip clones where both fragments are in the same directorynofalse
ignore-caseIgnore case of symbols (experimental)nofalse
follow-symlinksFollow symbolic linksnofalse
no-gitignoreDo not respect .gitignore filesnofalse
absoluteUse absolute paths in reportsnofalse
formats-extsCustom format-to-extension mappings (e.g. javascript:es,es6;dart:dt)no""
formats-namesCustom format-to-filename mappings (e.g. makefile:Makefile,GNUmakefile;docker:Dockerfile)no""
versionVersion of jscpd to install (default: latest)nolatest
install-prefixInstallation directory for the cpd binary (default: /usr/local/bin on Linux/macOS, npm global bin on Windows)no""
skip-installSkip installation (use when jscpd/cpd is already installed)nofalse
extra-argsAdditional arguments passed directly to cpd/jscpdno""
upload-reportUpload the report directory as a workflow artifactnofalse
upload-sarifUpload SARIF report to GitHub Code Scanningnotrue
namedescription
duplication-percentagePercentage of duplicated code found
clones-foundNumber of clone pairs found
duplicated-linesNumber of duplicated lines
total-linesTotal number of lines scanned
files-countNumber of source files scanned
report-pathPath to the output directory
sarif-pathPath to the SARIF report file (empty if not generated)
exit-codeExit code from jscpd (non-zero if threshold exceeded or --exit-code used)