{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://json.schemastore.org/jscpd.json","additionalProperties":false,"definitions":{"colorPreset":{"enum":["green","blue","red","yellow","orange","purple","pink","grey","gray","cyan","black"]},"colorHex":{"type":"string","pattern":"([0-9a-fA-F]{3}){1,2}"},"color":{"oneOf":[{"$ref":"#/definitions/colorPreset"},{"$ref":"#/definitions/colorHex"}]},"format":{"anyOf":[{"enum":["abap","actionscript","ada","apacheconf","apl","applescript","arduino","arff","asciidoc","asm6502","aspnet","autohotkey","autoit","bash","basic","batch","bison","brainfuck","bro","c","c-header","clike","clojure","coffeescript","comments","cpp","cpp-header","crystal","csharp","csp","css-extras","css","d","dart","diff","django","docker","eiffel","elixir","elm","erb","erlang","flow","fortran","fsharp","gdscript","gedcom","gherkin","git","glsl","go","graphql","groovy","haml","handlebars","haskell","haxe","hpkp","hsts","http","ichigojam","icon","inform7","ini","io","j","java","javascript","jolie","json","jsx","julia","keymap","kotlin","latex","less","liquid","lisp","livescript","lolcode","lua","makefile","markdown","markup","matlab","mel","mizar","monkey","n4js","nasm","nginx","nim","nix","nsis","objectivec","ocaml","opencl","oz","parigp","pascal","perl","php","plsql","powershell","processing","prolog","properties","protobuf","pug","puppet","pure","python","q","qore","r","razor","reason","renpy","rest","rip","roboconf","ruby","rust","sas","sass","scala","scheme","scss","svelte","smalltalk","smarty","soy","sql","stylus","swift","tap","tcl","textile","tsx","tt2","twig","typescript","txt","vbnet","velocity","verilog","vhdl","vim","visual-basic","astro","vue","wasm","wiki","xeora","xojo","xquery","yaml","abnf","agda","antlr4","apex","aql","armasm","awk","bicep","bnf","cfscript","cfml","cmake","cobol","csv","cypher","dhall","dns-zone-file","dot","ebnf","editorconfig","excel-formula","factor","ftl","gcode","gettext","gml","go-module","hcl","hlsl","idris","ignore","jq","json5","kusto","lilypond","linker-script","llvm","log","mermaid","mongodb","n1ql","odin","openqasm","plant-uml","powerquery","promql","purescript","qsharp","racket","regex","rego","rescript","robotframework","shell-session","smali","solidity","sparql","stata","toml","turtle","typoscript","unrealscript","uri","vala","wgsl","wolfram","zig"]},{"type":"string","minLength":1}]},"reporter":{"anyOf":[{"enum":["ai","badge","console","console-full","consoleFull","csv","full","html","json","markdown","sarif","silent","threshold","xcode","xml"]},{"type":"string","minLength":1}]},"formatMapping":{"anyOf":[{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}},{"type":"array","items":{"type":"string"}},{"type":"string"}]}},"properties":{"minLines":{"type":"integer","default":5,"description":"minimum size of code block in lines to check for duplication"},"maxLines":{"type":"integer","default":1000,"description":"maximum size of source file in lines to check for duplication"},"maxSize":{"anyOf":[{"type":"string","pattern":"^\\+?[0-9]+(\\.[0-9]+)? *([kKmMgGtTpP]?[bB]|[kKmMgG])?$"},{"type":"integer"}],"default":"100kb","description":"maximum size of source file in bytes to check for duplication (e.g., 102400, 1kb, 1m, 120kb)"},"minTokens":{"type":"integer","default":50,"description":"minimum size of code block in tokens to check for duplication"},"threshold":{"type":"number","description":"maximum allowed duplicate lines expressed as a percentage; exit with error and exit code 1 when threshold exceeded"},"formatsExts":{"$ref":"#/definitions/formatMapping","default":{},"description":"custom mapping from formats to file extensions, as an object or mapping string (e.g. javascript:es,es6;dart:dt); see https://github.com/kucherenko/jscpd/blob/master/FORMATS.md"},"output":{"type":"string","default":"./report","description":"path to directory for non-console reports"},"path":{"type":"array","items":{"type":"string"},"description":"paths that should be included in duplicate detection (default: [process.cwd()])"},"pattern":{"type":"string","default":"**/*","description":"glob pattern for files that should be included in duplicate detection (e.g., **/*.txt); only used to filter directories configured via path option"},"ignorePattern":{"type":"array","items":{"type":"string"},"default":[],"description":"ignore code blocks matching these regular expressions"},"mode":{"enum":["mild","strict","weak"],"default":"mild","description":"mode of detection quality; see https://github.com/kucherenko/jscpd/blob/master/packages/jscpd/README.md#mode"},"ignore":{"type":"array","items":{"type":"string"},"default":[],"description":"glob pattern for files that should be excluded from duplicate detection"},"format":{"oneOf":[{"type":"array","items":{"$ref":"#/definitions/format"}},{"$ref":"#/definitions/format"}],"description":"format or list of formats for which to detect duplication (default: all); see https://github.com/kucherenko/jscpd/blob/master/FORMATS.md"},"store":{"anyOf":[{"enum":["leveldb","redis"]},{"type":"string","minLength":1}],"description":"store 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."},"reporters":{"type":"array","items":{"$ref":"#/definitions/reporter"},"default":["console"],"description":"a 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 supported"},"blame":{"type":"boolean","default":false,"description":"get information about authors and dates of duplicated blocks from Git"},"silent":{"type":"boolean","default":false,"description":"do not write duplicate detection progress and result to console"},"verbose":{"type":"boolean","default":false,"description":"show full information during duplicate detection"},"absolute":{"type":"boolean","default":false,"description":"use absolute paths in reports"},"noSymlinks":{"type":"boolean","default":false,"description":"do not follow symlinks"},"skipLocal":{"type":"boolean","default":false,"description":"skip duplicates within folders; just detect cross-folder duplicates"},"ignoreCase":{"type":"boolean","default":false,"description":"ignore case of symbols in code (experimental)"},"gitignore":{"type":"boolean","default":true,"description":"respect .gitignore files. Enabled by default in current jscpd; set false to opt out in v4 configs."},"reportersOptions":{"type":"object","default":{},"additionalProperties":true,"properties":{"badge":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string","description":"output path for duplication level badge (default: path.join(output, 'jscpd-badge.svg'))"},"label":{"type":"string","default":"Copy/Paste","description":"badge subject text (URL-encoding needed for spaces or special characters)"},"labelColor":{"$ref":"#/definitions/color","default":"555","description":"badge label color (name or RGB code without #); see https://github.com/badgen/badgen/blob/master/src/color-presets.ts"},"status":{"type":"string","description":"badge value text (URL-encoding needed for spaces or special characters, default: duplication %)"},"color":{"$ref":"#/definitions/color","description":"badge color (name or RGB code without #, default: green if beneath threshold, red if above threshold, grey if threshold not set); see https://github.com/badgen/badgen/blob/master/src/color-presets.ts"},"style":{"enum":["flat","classic"],"default":"classic","description":"badge look: flat or classic"},"icon":{"type":"string","description":"URL for icon to display in front of badge subject text (e.g., data:image/svg+xml;base64,...)"},"iconWidth":{"type":"number","default":13,"description":"SVG width of icon to display in front of badge subject text; set this if icon is not square"},"scale":{"type":"number","default":1,"description":"size of badge relative to default of 1"}}}}},"exitCode":{"type":"integer","default":0,"description":"exit code to use when at least one duplicate code block is detected but threshold is not exceeded"},"formatsNames":{"$ref":"#/definitions/formatMapping","default":{},"description":"custom mapping from formats to exact filenames without relying on extensions (e.g. makefile:Makefile,GNUmakefile); see https://github.com/kucherenko/jscpd/blob/master/FORMATS.md"},"formats":{"oneOf":[{"type":"array","items":{"$ref":"#/definitions/format"}},{"$ref":"#/definitions/format"}],"description":"v5 alias for format; format or list of formats for which to detect duplication"},"storePath":{"type":"string","description":"directory 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."},"noGitignore":{"type":"boolean","default":false,"description":"v5 config field matching --no-gitignore; do not respect .gitignore files"},"followSymlinks":{"type":"boolean","default":false,"description":"v5 config field matching --follow-symlinks; follow symbolic links"},"noSymLinks":{"type":"boolean","default":false,"description":"compatibility alias for noSymlinks with a capital L; prefer noSymlinks or followSymlinks"},"noColors":{"type":"boolean","default":false,"description":"disable ANSI color output"},"noTips":{"type":"boolean","default":false,"description":"suppress tips and promotional messages after detection"},"debug":{"type":"boolean","default":false,"description":"show debug information and do not run detection in v4; silently ignored by v5 config compatibility handling"},"min-tokens":{"type":"integer","default":50,"description":"v5 kebab-case alias for minTokens. minimum size of code block in tokens to check for duplication"},"min-lines":{"type":"integer","default":5,"description":"v5 kebab-case alias for minLines. minimum size of code block in lines to check for duplication"},"max-lines":{"type":"integer","default":1000,"description":"v5 kebab-case alias for maxLines. maximum size of source file in lines to check for duplication"},"max-size":{"anyOf":[{"type":"string","pattern":"^\\+?[0-9]+(\\.[0-9]+)? *([kKmMgGtTpP]?[bB]|[kKmMgG])?$"},{"type":"integer"}],"default":"100kb","description":"v5 kebab-case alias for maxSize. maximum size of source file in bytes to check for duplication (e.g., 102400, 1kb, 1m, 120kb)"},"ignore-pattern":{"type":"array","items":{"type":"string"},"default":[],"description":"v5 kebab-case alias for ignorePattern. ignore code blocks matching these regular expressions"},"ignore-case":{"type":"boolean","default":false,"description":"v5 kebab-case alias for ignoreCase. ignore case of symbols in code (experimental)"},"no-gitignore":{"type":"boolean","default":false,"description":"v5 kebab-case alias for noGitignore. v5 config field matching --no-gitignore; do not respect .gitignore files"},"follow-symlinks":{"type":"boolean","default":false,"description":"v5 kebab-case alias for followSymlinks. v5 config field matching --follow-symlinks; follow symbolic links"},"skip-local":{"type":"boolean","default":false,"description":"v5 kebab-case alias for skipLocal. skip duplicates within folders; just detect cross-folder duplicates"},"exit-code":{"type":"integer","default":0,"description":"v5 kebab-case alias for exitCode. exit code to use when at least one duplicate code block is detected but threshold is not exceeded"},"no-colors":{"type":"boolean","default":false,"description":"v5 kebab-case alias for noColors. disable ANSI color output"},"no-tips":{"type":"boolean","default":false,"description":"v5 kebab-case alias for noTips. suppress tips and promotional messages after detection"},"formats-exts":{"$ref":"#/definitions/formatMapping","default":{},"description":"v5 kebab-case alias for formatsExts. custom mapping from formats to file extensions, as an object or mapping string (e.g. javascript:es,es6;dart:dt); see https://github.com/kucherenko/jscpd/blob/master/FORMATS.md"},"formats-names":{"$ref":"#/definitions/formatMapping","default":{},"description":"v5 kebab-case alias for formatsNames. custom mapping from formats to exact filenames without relying on extensions (e.g. makefile:Makefile,GNUmakefile); see https://github.com/kucherenko/jscpd/blob/master/FORMATS.md"}},"type":"object"}