Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / jscpd Configuration
Schema registry

jscpd Configuration

Copy/paste detector for programming source code

.jscpd.json

Check your file against this schema

Opens the validator with this schema already loaded. Paste your .jscpd.json and it validates in your browser — nothing is uploaded.

Validate a .jscpd.json → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
minLinesintegerminimum size of code block in lines to check for duplication
default: 5
maxLinesintegermaximum size of source file in lines to check for duplication
default: 1000
maxSizeanyOfmaximum size of source file in bytes to check for duplication (e.g., 102400, 1kb, 1m, 120kb)
default: "100kb"
minTokensintegerminimum size of code block in tokens to check for duplication
default: 50
thresholdnumbermaximum allowed duplicate lines expressed as a percentage; exit with error and exit code 1 when threshold exceeded
formatsExtsanyOf
outputstringpath to directory for non-console reports
default: "./report"
patharray<string>paths that should be included in duplicate detection (default: [process.cwd()])
patternstringglob pattern for files that should be included in duplicate detection (e.g., **/*.txt); only used to filter directories configured via path option
default: "**/*"
ignorePatternarray<string>ignore code blocks matching these regular expressions
default: []
modeenummode of detection quality; see https://github.com/kucherenko/jscpd/blob/master/packages/jscpd/README.md#mode
default: "mild"
one of: "mild", "strict", "weak"
ignorearray<string>glob pattern for files that should be excluded from duplicate detection
default: []
formatoneOfformat or list of formats for which to detect duplication (default: all); see https://github.com/kucherenko/jscpd/blob/master/FORMATS.md
storeanyOfstore used to collect information about code. v4 supports external stores such as leveldb and redis; v5 reports this config field as migrated to the CLI --store flag.
reportersarraya list of reporters to use to output information about duplication; built-ins include console, consoleFull/console-full, json, xml, csv, html, markdown, badge, sarif, ai, xcode, threshold, and silent; third-party reporters are also
default: ["console"]
blamebooleanget information about authors and dates of duplicated blocks from Git
default: false
silentbooleando not write duplicate detection progress and result to console
default: false
verbosebooleanshow full information during duplicate detection
default: false
absolutebooleanuse absolute paths in reports
default: false
noSymlinksbooleando not follow symlinks
default: false
skipLocalbooleanskip duplicates within folders; just detect cross-folder duplicates
default: false
ignoreCasebooleanignore case of symbols in code (experimental)
default: false
gitignorebooleanrespect .gitignore files. Enabled by default in current jscpd; set false to opt out in v4 configs.
default: true
reportersOptionsobject
default: {}
reportersOptions.badgeobject
reportersOptions.badge.pathstringoutput path for duplication level badge (default: path.join(output, 'jscpd-badge.svg'))
reportersOptions.badge.labelstringbadge subject text (URL-encoding needed for spaces or special characters)
default: "Copy/Paste"
reportersOptions.badge.labelColoroneOf
reportersOptions.badge.statusstringbadge value text (URL-encoding needed for spaces or special characters, default: duplication %)
reportersOptions.badge.coloroneOf
reportersOptions.badge.styleenumbadge look: flat or classic
default: "classic"
one of: "flat", "classic"
reportersOptions.badge.iconstringURL for icon to display in front of badge subject text (e.g., data:image/svg+xml;base64,...)
reportersOptions.badge.iconWidthnumberSVG width of icon to display in front of badge subject text; set this if icon is not square
default: 13
reportersOptions.badge.scalenumbersize of badge relative to default of 1
default: 1
exitCodeintegerexit code to use when at least one duplicate code block is detected but threshold is not exceeded
default: 0
formatsNamesanyOf
formatsoneOfv5 alias for format; format or list of formats for which to detect duplication
storePathstringdirectory used by the v4 store for cache files, useful for isolating parallel LevelDB runs. v5 reports this config field as migrated to the CLI --store-path flag.
noGitignorebooleanv5 config field matching --no-gitignore; do not respect .gitignore files
default: false
followSymlinksbooleanv5 config field matching --follow-symlinks; follow symbolic links
default: false
noSymLinksbooleancompatibility alias for noSymlinks with a capital L; prefer noSymlinks or followSymlinks
default: false
noColorsbooleandisable ANSI color output
default: false
noTipsbooleansuppress tips and promotional messages after detection
default: false
debugbooleanshow debug information and do not run detection in v4; silently ignored by v5 config compatibility handling
default: false
min-tokensintegerv5 kebab-case alias for minTokens. minimum size of code block in tokens to check for duplication
default: 50
min-linesintegerv5 kebab-case alias for minLines. minimum size of code block in lines to check for duplication
default: 5
max-linesintegerv5 kebab-case alias for maxLines. maximum size of source file in lines to check for duplication
default: 1000
max-sizeanyOfv5 kebab-case alias for maxSize. maximum size of source file in bytes to check for duplication (e.g., 102400, 1kb, 1m, 120kb)
default: "100kb"
ignore-patternarray<string>v5 kebab-case alias for ignorePattern. ignore code blocks matching these regular expressions
default: []
ignore-casebooleanv5 kebab-case alias for ignoreCase. ignore case of symbols in code (experimental)
default: false
no-gitignorebooleanv5 kebab-case alias for noGitignore. v5 config field matching --no-gitignore; do not respect .gitignore files
default: false
follow-symlinksbooleanv5 kebab-case alias for followSymlinks. v5 config field matching --follow-symlinks; follow symbolic links
default: false
skip-localbooleanv5 kebab-case alias for skipLocal. skip duplicates within folders; just detect cross-folder duplicates
default: false
exit-codeintegerv5 kebab-case alias for exitCode. exit code to use when at least one duplicate code block is detected but threshold is not exceeded
default: 0
no-colorsbooleanv5 kebab-case alias for noColors. disable ANSI color output
default: false
no-tipsbooleanv5 kebab-case alias for noTips. suppress tips and promotional messages after detection
default: false
formats-extsanyOf
formats-namesanyOf

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$idJSON Schema Core, draft 2020-12§8.2.1 — The "$id" Keyword
$refJSON Schema Core, draft 2020-12§8.2.3.1 — Direct References with "$ref"
$schemaJSON Schema Core, draft 2020-12§8.1.1 — "$schema"
additionalPropertiesJSON Schema Core, draft 2020-12§10.3.2.3 — "additionalProperties"
anyOfJSON Schema Core, draft 2020-12§10.2.1.2 — "anyOf"
defaultJSON Schema Validation, draft 2020-12§9.2 — "default"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
enumJSON Schema Validation, draft 2020-12§6.1.2 — "enum"
formatJSON Schema Validation, draft 2020-12§7 — Vocabularies for Semantic Content With "format"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
minLengthJSON Schema Validation, draft 2020-12§6.3.2 — "minLength"
oneOfJSON Schema Core, draft 2020-12§10.2.1.3 — "oneOf"
patternJSON Schema Validation, draft 2020-12§6.3.3 — "pattern"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas