[{"data":1,"prerenderedAt":2894},["ShallowReactive",2],{"navigation_docs":3,"-reference-config-file":249,"-reference-config-file-surround":2885,"page-views-\u002Freference\u002Fconfig-file":2890},[4,29,104,124,194],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Start",false,"\u002Fstart","1.start",[10,14,19,24],{"title":11,"path":7,"stem":12,"icon":13},"What jscpd finds","1.start\u002Findex","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fstart\u002Finstallation","1.start\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quickstart","\u002Fstart\u002Fquickstart","1.start\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Configuration basics","\u002Fstart\u002Fconfiguration","1.start\u002F4.configuration","i-lucide-settings-2",{"title":30,"icon":6,"path":31,"stem":32,"children":33,"page":6},"Guides","\u002Fguides","2.guides",[34,39,44,49,54,59,64,69,74,79,84,89,94,99],{"title":35,"path":36,"stem":37,"icon":38},"Use jscpd in CI","\u002Fguides\u002Fci","2.guides\u002F01.ci","i-lucide-github",{"title":40,"path":41,"stem":42,"icon":43},"Pre-commit hooks","\u002Fguides\u002Fpre-commit","2.guides\u002F02.pre-commit","i-lucide-git-commit",{"title":45,"path":46,"stem":47,"icon":48},"Fail only on new duplication","\u002Fguides\u002Fbaseline","2.guides\u002F03.baseline","i-lucide-git-compare",{"title":50,"path":51,"stem":52,"icon":53},"Monorepos","\u002Fguides\u002Fmonorepos","2.guides\u002F04.monorepos","i-lucide-folder-tree",{"title":55,"path":56,"stem":57,"icon":58},"Cross-format detection","\u002Fguides\u002Fcross-format","2.guides\u002F05.cross-format","i-lucide-layers",{"title":60,"path":61,"stem":62,"icon":63},"Agents","\u002Fguides\u002Fagents","2.guides\u002F06.agents","i-lucide-cpu",{"title":65,"path":66,"stem":67,"icon":68},"Editors","\u002Fguides\u002Feditors","2.guides\u002F07.editors","i-lucide-code",{"title":70,"path":71,"stem":72,"icon":73},"Duplication over git history","\u002Fguides\u002Fhistory","2.guides\u002F08.history","i-lucide-chart-no-axes-combined",{"title":75,"path":76,"stem":77,"icon":78},"Dashboard and health score","\u002Fguides\u002Fdashboard","2.guides\u002F09.dashboard","i-lucide-layout-dashboard",{"title":80,"path":81,"stem":82,"icon":83},"Dead code","\u002Fguides\u002Fdead-code","2.guides\u002F10.dead-code","i-lucide-ghost",{"title":85,"path":86,"stem":87,"icon":88},"Comparing two codebases","\u002Fguides\u002Fcompare","2.guides\u002F11.compare","i-lucide-git-compare-arrows",{"title":90,"path":91,"stem":92,"icon":93},"Semantic clones","\u002Fguides\u002Fsemantic-clones","2.guides\u002F12.semantic-clones","i-lucide-brain-circuit",{"title":95,"path":96,"stem":97,"icon":98},"Similar functions","\u002Fguides\u002Fsimilarity","2.guides\u002F13.similarity","i-lucide-list-tree",{"title":100,"path":101,"stem":102,"icon":103},"Boundaries","\u002Fguides\u002Fboundaries","2.guides\u002F14.boundaries","i-lucide-fence",{"title":105,"icon":6,"path":106,"stem":107,"children":108,"page":6},"Concepts","\u002Fconcepts","3.concepts",[109,114,119],{"title":110,"path":111,"stem":112,"icon":113},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":115,"path":116,"stem":117,"icon":118},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":120,"path":121,"stem":122,"icon":123},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":125,"icon":6,"path":126,"stem":127,"children":128,"page":6},"Reference","\u002Freference","4.reference",[129,134,139,144,181,186,190],{"title":130,"path":131,"stem":132,"icon":133},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":135,"path":136,"stem":137,"icon":138},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":140,"path":141,"stem":142,"icon":143},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":145,"icon":6,"path":146,"stem":147,"children":148},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[149,151,156,161,166,171,176],{"title":145,"path":146,"stem":147,"icon":150},"i-lucide-file-chart-column",{"title":152,"path":153,"stem":154,"icon":155},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":157,"path":158,"stem":159,"icon":160},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":162,"path":163,"stem":164,"icon":165},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":167,"path":168,"stem":169,"icon":170},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":172,"path":173,"stem":174,"icon":175},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":177,"path":178,"stem":179,"icon":180},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":182,"path":183,"stem":184,"icon":185},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":187,"path":188,"stem":189,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":191,"path":192,"stem":193,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":195,"icon":6,"path":196,"stem":197,"children":198,"page":6},"Project","\u002Fproject","5.project",[199,204,209,214,239,244],{"title":200,"path":201,"stem":202,"icon":203},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":205,"path":206,"stem":207,"icon":208},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":210,"path":211,"stem":212,"icon":213},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":215,"icon":6,"path":216,"stem":217,"children":218},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[219,221,226,230,235],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-gauge",{"title":222,"path":223,"stem":224,"icon":225},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":227,"path":228,"stem":229,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":231,"path":232,"stem":233,"icon":234},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":236,"path":237,"stem":238,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":240,"path":241,"stem":242,"icon":243},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":245,"path":246,"stem":247,"icon":248},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"id":250,"title":135,"body":251,"description":2877,"extension":2878,"links":2879,"meta":2880,"navigation":2881,"path":136,"seo":2882,"stem":137,"__hash__":2884},"docs\u002F4.reference\u002F2.config-file.md",{"type":252,"value":253,"toc":2855},"minimark",[254,283,288,291,331,349,385,389,395,690,732,737,976,980,1225,1229,1387,1391,1498,1502,1678,1727,1737,1741,1753,1877,1880,1885,1930,1953,1956,1963,1967,1990,2015,2023,2029,2052,2056,2072,2117,2128,2134,2149,2153,2165,2257,2278,2281,2308,2310,2318,2462,2707,2727,2731,2736,2748,2754,2782,2786,2819,2823,2851],[255,256,257,258,262,263,267,268,271,272,275,276,271,279,282],"p",{},"This page lists the keys jscpd reads from ",[259,260,261],"code",{},".jscpd.json",", their types, and the forms the file can take. Every key is a flag of the ",[264,265,266],"a",{"href":131},"command line"," spelled in camelCase: ",[259,269,270],{},"--min-tokens 70"," becomes ",[259,273,274],{},"\"minTokens\": 70",", ",[259,277,278],{},"--no-gitignore",[259,280,281],{},"\"noGitignore\": true",", and a flag given on the command line wins over the file. jscpd reads the file from the directory it runs in, never from the paths it scans.",[284,285,287],"h2",{"id":286},"where-jscpd-looks","Where jscpd looks",[255,289,290],{},"jscpd takes the first of these that exists and reads no other:",[292,293,294,306,311,321],"ol",{},[295,296,297,298,301,302,305],"li",{},"The file named with ",[259,299,300],{},"-c"," or ",[259,303,304],{},"--config",", from anywhere. A file that is missing or is not valid JSON stops the run with exit code 1.",[295,307,308,310],{},[259,309,261],{}," in the working directory.",[295,312,313,316,317,320],{},[259,314,315],{},".config\u002Fjscpd.json",", then ",[259,318,319],{},".config\u002F.jscpd.json",", in the working directory (5.1.0+).",[295,322,323,324,327,328,310],{},"The ",[259,325,326],{},"jscpd"," key of ",[259,329,330],{},"package.json",[255,332,333,334,337,338,341,342,345,346,348],{},"The run prints ",[259,335,336],{},"Using config from \u003Cfile>"," when it found one. The scanned path plays no part: ",[259,339,340],{},"jscpd packages\u002Fapi"," from the repository root reads the root's file and ignores ",[259,343,344],{},"packages\u002Fapi\u002F.jscpd.json",", so a scan from another directory needs ",[259,347,300],{},". A found file that does not parse is reported as a warning and skipped, and the search goes on to the next source.",[255,350,351,352,275,355,275,358,361,362,365,366,369,370,373,374,377,378,384],{},"Relative paths in ",[259,353,354],{},"path",[259,356,357],{},"baseline",[259,359,360],{},"healthInput"," and the dead-code ",[259,363,364],{},"rustDiagnostics"," resolve against the directory of the config file, which is the working directory for a found file. ",[259,367,368],{},"output"," is relative to the working directory, and the globs in ",[259,371,372],{},"ignore"," and ",[259,375,376],{},"pattern"," are matched against the paths below each scanned root. The paths and globs of ",[264,379,381],{"href":380},"#boundaries",[259,382,383],{},"boundaries"," start in the directory of the config file too.",[284,386,388],{"id":387},"the-file","The file",[255,390,391,392,394],{},"A ",[259,393,261],{}," most projects could start from:",[396,397,402],"pre",{"className":398,"code":399,"filename":261,"language":400,"meta":401,"style":401},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"threshold\": 3,\n  \"minTokens\": 50,\n  \"minLines\": 5,\n  \"mode\": \"mild\",\n  \"format\": [\"javascript\", \"typescript\", \"python\"],\n  \"ignore\": [\"**\u002Fnode_modules\u002F**\", \"**\u002Fdist\u002F**\", \"**\u002F*.min.js\"],\n  \"ignorePattern\": [\"(?s)\\\\A\u002F\\\\*.*?\\\\*\u002F\"],\n  \"reporters\": [\"console\", \"html\"],\n  \"output\": \"report\",\n  \"absolute\": false\n}\n","json","",[259,403,404,413,436,453,470,493,537,577,617,649,669,684],{"__ignoreMap":401},[405,406,409],"span",{"class":407,"line":408},"line",1,[405,410,412],{"class":411},"sMK4o","{\n",[405,414,416,419,423,426,429,433],{"class":407,"line":415},2,[405,417,418],{"class":411},"  \"",[405,420,422],{"class":421},"spNyl","threshold",[405,424,425],{"class":411},"\"",[405,427,428],{"class":411},":",[405,430,432],{"class":431},"sbssI"," 3",[405,434,435],{"class":411},",\n",[405,437,439,441,444,446,448,451],{"class":407,"line":438},3,[405,440,418],{"class":411},[405,442,443],{"class":421},"minTokens",[405,445,425],{"class":411},[405,447,428],{"class":411},[405,449,450],{"class":431}," 50",[405,452,435],{"class":411},[405,454,456,458,461,463,465,468],{"class":407,"line":455},4,[405,457,418],{"class":411},[405,459,460],{"class":421},"minLines",[405,462,425],{"class":411},[405,464,428],{"class":411},[405,466,467],{"class":431}," 5",[405,469,435],{"class":411},[405,471,473,475,478,480,482,485,489,491],{"class":407,"line":472},5,[405,474,418],{"class":411},[405,476,477],{"class":421},"mode",[405,479,425],{"class":411},[405,481,428],{"class":411},[405,483,484],{"class":411}," \"",[405,486,488],{"class":487},"sfazB","mild",[405,490,425],{"class":411},[405,492,435],{"class":411},[405,494,496,498,501,503,505,508,510,513,515,518,520,523,525,527,529,532,534],{"class":407,"line":495},6,[405,497,418],{"class":411},[405,499,500],{"class":421},"format",[405,502,425],{"class":411},[405,504,428],{"class":411},[405,506,507],{"class":411}," [",[405,509,425],{"class":411},[405,511,512],{"class":487},"javascript",[405,514,425],{"class":411},[405,516,517],{"class":411},",",[405,519,484],{"class":411},[405,521,522],{"class":487},"typescript",[405,524,425],{"class":411},[405,526,517],{"class":411},[405,528,484],{"class":411},[405,530,531],{"class":487},"python",[405,533,425],{"class":411},[405,535,536],{"class":411},"],\n",[405,538,540,542,544,546,548,550,552,555,557,559,561,564,566,568,570,573,575],{"class":407,"line":539},7,[405,541,418],{"class":411},[405,543,372],{"class":421},[405,545,425],{"class":411},[405,547,428],{"class":411},[405,549,507],{"class":411},[405,551,425],{"class":411},[405,553,554],{"class":487},"**\u002Fnode_modules\u002F**",[405,556,425],{"class":411},[405,558,517],{"class":411},[405,560,484],{"class":411},[405,562,563],{"class":487},"**\u002Fdist\u002F**",[405,565,425],{"class":411},[405,567,517],{"class":411},[405,569,484],{"class":411},[405,571,572],{"class":487},"**\u002F*.min.js",[405,574,425],{"class":411},[405,576,536],{"class":411},[405,578,580,582,585,587,589,591,593,596,600,603,605,608,610,613,615],{"class":407,"line":579},8,[405,581,418],{"class":411},[405,583,584],{"class":421},"ignorePattern",[405,586,425],{"class":411},[405,588,428],{"class":411},[405,590,507],{"class":411},[405,592,425],{"class":411},[405,594,595],{"class":487},"(?s)",[405,597,599],{"class":598},"sTEyZ","\\\\",[405,601,602],{"class":487},"A\u002F",[405,604,599],{"class":598},[405,606,607],{"class":487},"*.*?",[405,609,599],{"class":598},[405,611,612],{"class":487},"*\u002F",[405,614,425],{"class":411},[405,616,536],{"class":411},[405,618,620,622,625,627,629,631,633,636,638,640,642,645,647],{"class":407,"line":619},9,[405,621,418],{"class":411},[405,623,624],{"class":421},"reporters",[405,626,425],{"class":411},[405,628,428],{"class":411},[405,630,507],{"class":411},[405,632,425],{"class":411},[405,634,635],{"class":487},"console",[405,637,425],{"class":411},[405,639,517],{"class":411},[405,641,484],{"class":411},[405,643,644],{"class":487},"html",[405,646,425],{"class":411},[405,648,536],{"class":411},[405,650,652,654,656,658,660,662,665,667],{"class":407,"line":651},10,[405,653,418],{"class":411},[405,655,368],{"class":421},[405,657,425],{"class":411},[405,659,428],{"class":411},[405,661,484],{"class":411},[405,663,664],{"class":487},"report",[405,666,425],{"class":411},[405,668,435],{"class":411},[405,670,672,674,677,679,681],{"class":407,"line":671},11,[405,673,418],{"class":411},[405,675,676],{"class":421},"absolute",[405,678,425],{"class":411},[405,680,428],{"class":411},[405,682,683],{"class":411}," false\n",[405,685,687],{"class":407,"line":686},12,[405,688,689],{"class":411},"}\n",[255,691,692,693,696,697,275,700,275,703,275,706,275,709,712,713,275,716,275,719,275,722,275,725,275,728,731],{},"The tables below give each key with its type and what it decides. The defaults are on the ",[264,694,695],{"href":131},"CLI page",", which also marks the flags that have no key: ",[259,698,699],{},"--workers",[259,701,702],{},"--update-baseline",[259,704,705],{},"--semantic-download",[259,707,708],{},"--list",[259,710,711],{},"--debug"," and the switches that choose another run (",[259,714,715],{},"--dashboard",[259,717,718],{},"--health",[259,720,721],{},"--complexity",[259,723,724],{},"--compare",[259,726,727],{},"--mcp",[259,729,730],{},"--lsp",") stay on the command line.",[733,734,736],"h3",{"id":735},"what-to-scan","What to scan",[738,739,740,756],"table",{},[741,742,743],"thead",{},[744,745,746,750,753],"tr",{},[747,748,749],"th",{},"Key",[747,751,752],{},"Type",[747,754,755],{},"What it decides",[757,758,759,772,791,804,823,842,858,874,894,912,931,944,956],"tbody",{},[744,760,761,766,769],{},[762,763,764],"td",{},[259,765,354],{},[762,767,768],{},"array of strings",[762,770,771],{},"The paths to scan when the command line names none, relative to the config file's directory.",[744,773,774,778,781],{},[762,775,776],{},[259,777,376],{},[762,779,780],{},"string",[762,782,783,784,301,787,790],{},"A glob the files must match, such as ",[259,785,786],{},"**\u002F*.ts",[259,788,789],{},"**\u002F*.{js,ts}",".",[744,792,793,797,799],{},[762,794,795],{},[259,796,372],{},[762,798,768],{},[762,800,801,802,790],{},"Globs for files and folders to leave out, such as ",[259,803,554],{},[744,805,806,810,812],{},[762,807,808],{},[259,809,500],{},[762,811,768],{},[762,813,814,815,818,819,822],{},"The formats to scan, by name from ",[259,816,817],{},"jscpd --list","; ",[259,820,821],{},"formats"," and a single string are accepted too.",[744,824,825,830,833],{},[762,826,827],{},[259,828,829],{},"formatsExts",[762,831,832],{},"string or object",[762,834,835,836,301,839,790],{},"Extra file extensions for a format: ",[259,837,838],{},"\"javascript:es,es6;dart:dt\"",[259,840,841],{},"{\"javascript\": [\"es\", \"es6\"]}",[744,843,844,849,851],{},[762,845,846],{},[259,847,848],{},"formatsNames",[762,850,832],{},[762,852,853,854,857],{},"File names for a format: ",[259,855,856],{},"\"makefile:Makefile,GNUmakefile;docker:Dockerfile\""," or the object form.",[744,859,860,865,868],{},[762,861,862],{},[259,863,864],{},"crossFormats",[762,866,867],{},"string, array of strings or array of arrays",[762,869,870,871,790],{},"Groups of formats compared in one pool; see ",[264,872,873],{"href":56},"cross-format detection",[744,875,876,881,884],{},[762,877,878],{},[259,879,880],{},"noGitignore",[762,882,883],{},"boolean",[762,885,886,889,890,893],{},[259,887,888],{},"true"," scans the files that ",[259,891,892],{},".gitignore"," lists.",[744,895,896,901,903],{},[762,897,898],{},[259,899,900],{},"followSymlinks",[762,902,883],{},[762,904,905,907,908,911],{},[259,906,888],{}," follows symbolic links; v4's ",[259,909,910],{},"noSymlinks"," is translated.",[744,913,914,919,921],{},[762,915,916],{},[259,917,918],{},"maxSize",[762,920,780],{},[762,922,923,924,275,927,930],{},"Files larger than this are skipped: ",[259,925,926],{},"\"500kb\"",[259,928,929],{},"\"2mb\""," or a number of bytes.",[744,932,933,938,941],{},[762,934,935],{},[259,936,937],{},"maxLines",[762,939,940],{},"number",[762,942,943],{},"Files with more lines than this are skipped; there is no limit unless you set one.",[744,945,946,951,953],{},[762,947,948],{},[259,949,950],{},"skipLocal",[762,952,883],{},[762,954,955],{},"Skip clones whose two fragments are under the same scanned root, which leaves the clones between roots.",[744,957,958,963,966],{},[762,959,960],{},[259,961,962],{},"skipIsolated",[762,964,965],{},"array of arrays of strings",[762,967,968,969,972,973,790],{},"Isolation groups; clones between two folders of one group are skipped: ",[259,970,971],{},"[[\"packages\u002Fa\", \"packages\u002Fb\"]]",". See ",[264,974,975],{"href":51},"monorepos",[733,977,979],{"id":978},"what-counts-as-a-clone","What counts as a clone",[738,981,982,992],{},[741,983,984],{},[744,985,986,988,990],{},[747,987,749],{},[747,989,752],{},[747,991,755],{},[757,993,994,1005,1016,1039,1054,1066,1078,1090,1106,1122,1137,1152,1182],{},[744,995,996,1000,1002],{},[762,997,998],{},[259,999,443],{},[762,1001,940],{},[762,1003,1004],{},"The smallest clone, in tokens.",[744,1006,1007,1011,1013],{},[762,1008,1009],{},[259,1010,460],{},[762,1012,940],{},[762,1014,1015],{},"The smallest clone, in lines.",[744,1017,1018,1022,1024],{},[762,1019,1020],{},[259,1021,477],{},[762,1023,780],{},[762,1025,1026,275,1028,301,1031,1034,1035,790],{},[259,1027,488],{},[259,1029,1030],{},"weak",[259,1032,1033],{},"strict","; see ",[264,1036,1038],{"href":1037},"#detection-modes","Detection modes",[744,1040,1041,1045,1047],{},[762,1042,1043],{},[259,1044,584],{},[762,1046,768],{},[762,1048,1049,1050,790],{},"Regular expressions whose matches are removed from every file before detection; see ",[264,1051,1053],{"href":1052},"#ignoring-code","Ignoring code",[744,1055,1056,1061,1063],{},[762,1057,1058],{},[259,1059,1060],{},"ignoreCase",[762,1062,883],{},[762,1064,1065],{},"Compare tokens without regard to case (experimental).",[744,1067,1068,1073,1075],{},[762,1069,1070],{},[259,1071,1072],{},"ignoreIdentifiers",[762,1074,883],{},[762,1076,1077],{},"Treat every identifier as the same one, which finds renamed clones.",[744,1079,1080,1085,1087],{},[762,1081,1082],{},[259,1083,1084],{},"ignoreLiterals",[762,1086,883],{},[762,1088,1089],{},"Treat every string and number literal as the same one.",[744,1091,1092,1097,1099],{},[762,1093,1094],{},[259,1095,1096],{},"ignoreAnnotations",[762,1098,883],{},[762,1100,1101,1102,1105],{},"Skip ",[259,1103,1104],{},"@Name"," annotations and decorators in the languages that have them.",[744,1107,1108,1113,1115],{},[762,1109,1110],{},[259,1111,1112],{},"maxGapLines",[762,1114,940],{},[762,1116,1117,1118,1121],{},"Merge two clones of one file pair that at most this many unmatched lines separate into one near-miss clone; ",[259,1119,1120],{},"0"," is off.",[744,1123,1124,1129,1132],{},[762,1125,1126],{},[259,1127,1128],{},"similarity",[762,1130,1131],{},"number in (0, 1]",[762,1133,1134,1135,790],{},"Report pairs of functions whose normalized syntax trees share at least this ratio of subtrees, in 15 languages; see ",[264,1136,95],{"href":96},[744,1138,1139,1144,1146],{},[762,1140,1141],{},[259,1142,1143],{},"minNodes",[762,1145,940],{},[762,1147,1148,1149,1151],{},"The fewest nodes a function's normalized syntax tree needs for ",[259,1150,1128],{}," to compare it; 20 by default.",[744,1153,1154,1159,1161],{},[762,1155,1156],{},[259,1157,1158],{},"kind",[762,1160,768],{},[762,1162,1163,1164,275,1167,275,1170,275,1173,275,1176,275,1179,790],{},"Report only these kinds: ",[259,1165,1166],{},"exact",[259,1168,1169],{},"renamed",[259,1171,1172],{},"similar",[259,1174,1175],{},"gap",[259,1177,1178],{},"ast",[259,1180,1181],{},"semantic",[744,1183,1184,1188,1191],{},[762,1185,1186],{},[259,1187,1181],{},[762,1189,1190],{},"boolean or object",[762,1192,1193,1195,1196,275,1199,275,1202,275,1205,275,1207,275,1210,275,1213,1216,1217,1220,1221,1224],{},[259,1194,888],{}," turns the semantic pass on; an object holds its settings (",[259,1197,1198],{},"enabled",[259,1200,1201],{},"scope",[259,1203,1204],{},"model",[259,1206,422],{},[259,1208,1209],{},"sameThreshold",[259,1211,1212],{},"url",[259,1214,1215],{},"provider"," and more), see ",[264,1218,1219],{"href":91},"semantic clones",". An API key never goes in the file: jscpd refuses a section that holds one and reads ",[259,1222,1223],{},"JSCPD_SEMANTIC_API_KEY"," instead.",[733,1226,1228],{"id":1227},"reports","Reports",[738,1230,1231,1241],{},[741,1232,1233],{},[744,1234,1235,1237,1239],{},[747,1236,749],{},[747,1238,752],{},[747,1240,755],{},[757,1242,1243,1257,1268,1279,1291,1303,1315,1327,1339,1351,1363],{},[744,1244,1245,1249,1251],{},[762,1246,1247],{},[259,1248,624],{},[762,1250,768],{},[762,1252,1253,1254,790],{},"The reporters to run, by name from the ",[264,1255,1256],{"href":146},"reporters page",[744,1258,1259,1263,1265],{},[762,1260,1261],{},[259,1262,368],{},[762,1264,780],{},[762,1266,1267],{},"The directory file reporters write to.",[744,1269,1270,1274,1276],{},[762,1271,1272],{},[259,1273,676],{},[762,1275,883],{},[762,1277,1278],{},"Absolute paths in reports.",[744,1280,1281,1286,1288],{},[762,1282,1283],{},[259,1284,1285],{},"blame",[762,1287,883],{},[762,1289,1290],{},"Add git blame data to every clone.",[744,1292,1293,1298,1300],{},[762,1294,1295],{},[259,1296,1297],{},"sarifErrorTokens",[762,1299,940],{},[762,1301,1302],{},"SARIF results of at least this many tokens are errors; the rest stay warnings.",[744,1304,1305,1310,1312],{},[762,1306,1307],{},[259,1308,1309],{},"noColors",[762,1311,883],{},[762,1313,1314],{},"No ANSI colors in the console.",[744,1316,1317,1322,1324],{},[762,1318,1319],{},[259,1320,1321],{},"silent",[762,1323,883],{},[762,1325,1326],{},"No progress and no result on the console.",[744,1328,1329,1334,1336],{},[762,1330,1331],{},[259,1332,1333],{},"noTips",[762,1335,883],{},[762,1337,1338],{},"No tips after detection.",[744,1340,1341,1346,1348],{},[762,1342,1343],{},[259,1344,1345],{},"summary",[762,1347,883],{},[762,1349,1350],{},"Append the codebase summary: top files and folders by tokens, lines, size and complexity.",[744,1352,1353,1358,1360],{},[762,1354,1355],{},[259,1356,1357],{},"summaryTop",[762,1359,940],{},[762,1361,1362],{},"Rows in each summary list.",[744,1364,1365,1370,1372],{},[762,1366,1367],{},[259,1368,1369],{},"summaryBy",[762,1371,780],{},[762,1373,1374,1375,275,1378,275,1381,301,1384,790],{},"The summary's ranking: ",[259,1376,1377],{},"tokens",[259,1379,1380],{},"lines",[259,1382,1383],{},"size",[259,1385,1386],{},"complexity",[733,1388,1390],{"id":1389},"gates","Gates",[738,1392,1393,1403],{},[741,1394,1395],{},[744,1396,1397,1399,1401],{},[747,1398,749],{},[747,1400,752],{},[747,1402,755],{},[757,1404,1405,1416,1428,1441,1458,1470,1484],{},[744,1406,1407,1411,1413],{},[762,1408,1409],{},[259,1410,422],{},[762,1412,940],{},[762,1414,1415],{},"The duplication percentage above which the run exits with code 1; a run that lands exactly on it passes.",[744,1417,1418,1423,1425],{},[762,1419,1420],{},[259,1421,1422],{},"exitCode",[762,1424,940],{},[762,1426,1427],{},"The exit code when at least one clone was found.",[744,1429,1430,1434,1436],{},[762,1431,1432],{},[259,1433,357],{},[762,1435,780],{},[762,1437,1438,1439,790],{},"The baseline file; clones absent from it are new. See ",[264,1440,357],{"href":46},[744,1442,1443,1448,1450],{},[762,1444,1445],{},[259,1446,1447],{},"failOnNewClones",[762,1449,940],{},[762,1451,1452,1453,301,1455,790],{},"Exit with code 1 when more than this many new clones are found; needs ",[259,1454,357],{},[259,1456,1457],{},"baselineFromRef",[744,1459,1460,1465,1467],{},[762,1461,1462],{},[259,1463,1464],{},"failOnEmpty",[762,1466,883],{},[762,1468,1469],{},"Exit with code 1 when the scan analyzes no files.",[744,1471,1472,1476,1478],{},[762,1473,1474],{},[259,1475,1457],{},[762,1477,780],{},[762,1479,1480,1481,790],{},"A git ref to build the baseline from, such as ",[259,1482,1483],{},"origin\u002Fmain",[744,1485,1486,1490,1493],{},[762,1487,1488],{},[259,1489,383],{},[762,1491,1492],{},"array of objects",[762,1494,1495,1496,790],{},"Rules that keep protected code inside its boundary; a copy outside one fails the run with exit code 1. It has no flag. See ",[264,1497,100],{"href":380},[733,1499,1501],{"id":1500},"other-runs-of-the-same-binary","Other runs of the same binary",[738,1503,1504,1514],{},[741,1505,1506],{},[744,1507,1508,1510,1512],{},[747,1509,749],{},[747,1511,752],{},[747,1513,755],{},[757,1515,1516,1534,1549,1578,1590,1602,1614,1629,1649,1660],{},[744,1517,1518,1526,1528],{},[762,1519,1520,275,1523],{},[259,1521,1522],{},"history",[259,1524,1525],{},"historySince",[762,1527,780],{},[762,1529,1530,1531,1533],{},"The commit range or the start date of a ",[264,1532,1522],{"href":71}," run.",[744,1535,1536,1544,1546],{},[762,1537,1538,275,1541],{},[259,1539,1540],{},"historyEvery",[259,1542,1543],{},"historyLimit",[762,1545,940],{},[762,1547,1548],{},"How the history series is sampled.",[744,1550,1551,1556,1558],{},[762,1552,1553],{},[259,1554,1555],{},"deadCode",[762,1557,1190],{},[762,1559,1560,1562,1563,1566,1567,1570,1571,373,1574,1577],{},[259,1561,888],{}," makes the run a ",[264,1564,1565],{"href":81},"dead code"," run; an object is its section and turns the run on only with ",[259,1568,1569],{},"\"enabled\": true",". ",[259,1572,1573],{},"dead-code",[259,1575,1576],{},"basta"," are aliases.",[744,1579,1580,1585,1587],{},[762,1581,1582],{},[259,1583,1584],{},"deadCodeCategories",[762,1586,768],{},[762,1588,1589],{},"The dead-code findings to report.",[744,1591,1592,1597,1599],{},[762,1593,1594],{},[259,1595,1596],{},"minConfidence",[762,1598,940],{},[762,1600,1601],{},"Drop dead-code findings below this confidence, 0 to 100.",[744,1603,1604,1609,1611],{},[762,1605,1606],{},[259,1607,1608],{},"entry",[762,1610,768],{},[762,1612,1613],{},"Globs of extra dead-code entry points.",[744,1615,1616,1624,1626],{},[762,1617,1618,275,1621],{},[259,1619,1620],{},"includeTests",[259,1622,1623],{},"includeEntryExports",[762,1625,883],{},[762,1627,1628],{},"Report dead code in test files, and the exports of entry files.",[744,1630,1631,1636,1639],{},[762,1632,1633],{},[259,1634,1635],{},"health",[762,1637,1638],{},"object",[762,1640,1641,1642,1645,1646,1648],{},"Tuning and external metrics of the ",[264,1643,1644],{"href":121},"health score","; it does not switch ",[259,1647,718],{}," on.",[744,1650,1651,1655,1657],{},[762,1652,1653],{},[259,1654,360],{},[762,1656,780],{},[762,1658,1659],{},"A JSON file with metrics from other tools for the health score.",[744,1661,1662,1667,1669],{},[762,1663,1664],{},[259,1665,1666],{},"lsp",[762,1668,1638],{},[762,1670,1671,1672,1674,1675,790],{},"What ",[259,1673,730],{}," runs for this project; see ",[264,1676,1677],{"href":66},"editors",[255,1679,1680,1681,275,1684,275,1687,1690,1691,1693,1694,1696,1697,275,1700,275,1703,275,1706,373,1709,1712,1713,275,1716,275,1719,1722,1723,1726],{},"Kebab-case spellings of the same keys (",[259,1682,1683],{},"min-tokens",[259,1685,1686],{},"ignore-pattern",[259,1688,1689],{},"cross-formats"," and so on) are accepted, so a v4 file works unchanged: ",[259,1692,910],{}," is translated into ",[259,1695,900],{},", the v4 keys ",[259,1698,1699],{},"gitignore",[259,1701,1702],{},"debug",[259,1704,1705],{},"verbose",[259,1707,1708],{},"config",[259,1710,1711],{},"xslHref"," are ignored without a word, and keys that v5 removed (",[259,1714,1715],{},"store",[259,1717,1718],{},"cache",[259,1720,1721],{},"reportersOptions"," and others) get a hint. A ",[259,1724,1725],{},"\"\u002F\u002F\""," key is ignored as well, which is the way to leave a comment in JSON.",[255,1728,1729,1730,1733,1734,1736],{},"A key jscpd does not know is reported as ",[259,1731,1732],{},"unknown field 'name'"," and the run goes on. A key with a value of the wrong type, say a string where an array is expected, is reported and dropped, and the other keys of the file still apply. ",[259,1735,383],{}," is stricter: a mistake in a rule stops the run, so a rule that is not checked can't look as if it passed.",[284,1738,1740],{"id":1739},"packagejson-form","package.json form",[255,1742,1743,1744,1746,1747,1749,1750,1752],{},"The same keys under a ",[259,1745,326],{}," key, with the same rules. jscpd reads them only when no ",[259,1748,261],{}," and no ",[259,1751,315],{}," is in the working directory.",[396,1754,1756],{"className":398,"code":1755,"filename":330,"language":400,"meta":401,"style":401},"{\n  \"name\": \"my-app\",\n  \"jscpd\": {\n    \"threshold\": 3,\n    \"ignore\": [\"**\u002Fnode_modules\u002F**\", \"**\u002Fdist\u002F**\"],\n    \"reporters\": [\"console\", \"html\"]\n  }\n}\n",[259,1757,1758,1762,1782,1795,1811,1839,1868,1873],{"__ignoreMap":401},[405,1759,1760],{"class":407,"line":408},[405,1761,412],{"class":411},[405,1763,1764,1766,1769,1771,1773,1775,1778,1780],{"class":407,"line":415},[405,1765,418],{"class":411},[405,1767,1768],{"class":421},"name",[405,1770,425],{"class":411},[405,1772,428],{"class":411},[405,1774,484],{"class":411},[405,1776,1777],{"class":487},"my-app",[405,1779,425],{"class":411},[405,1781,435],{"class":411},[405,1783,1784,1786,1788,1790,1792],{"class":407,"line":438},[405,1785,418],{"class":411},[405,1787,326],{"class":421},[405,1789,425],{"class":411},[405,1791,428],{"class":411},[405,1793,1794],{"class":411}," {\n",[405,1796,1797,1800,1803,1805,1807,1809],{"class":407,"line":455},[405,1798,1799],{"class":411},"    \"",[405,1801,422],{"class":1802},"sBMFI",[405,1804,425],{"class":411},[405,1806,428],{"class":411},[405,1808,432],{"class":431},[405,1810,435],{"class":411},[405,1812,1813,1815,1817,1819,1821,1823,1825,1827,1829,1831,1833,1835,1837],{"class":407,"line":472},[405,1814,1799],{"class":411},[405,1816,372],{"class":1802},[405,1818,425],{"class":411},[405,1820,428],{"class":411},[405,1822,507],{"class":411},[405,1824,425],{"class":411},[405,1826,554],{"class":487},[405,1828,425],{"class":411},[405,1830,517],{"class":411},[405,1832,484],{"class":411},[405,1834,563],{"class":487},[405,1836,425],{"class":411},[405,1838,536],{"class":411},[405,1840,1841,1843,1845,1847,1849,1851,1853,1855,1857,1859,1861,1863,1865],{"class":407,"line":495},[405,1842,1799],{"class":411},[405,1844,624],{"class":1802},[405,1846,425],{"class":411},[405,1848,428],{"class":411},[405,1850,507],{"class":411},[405,1852,425],{"class":411},[405,1854,635],{"class":487},[405,1856,425],{"class":411},[405,1858,517],{"class":411},[405,1860,484],{"class":411},[405,1862,644],{"class":487},[405,1864,425],{"class":411},[405,1866,1867],{"class":411},"]\n",[405,1869,1870],{"class":407,"line":539},[405,1871,1872],{"class":411},"  }\n",[405,1874,1875],{"class":407,"line":579},[405,1876,689],{"class":411},[284,1878,1038],{"id":1879},"detection-modes",[255,1881,1882,1884],{},[259,1883,477],{}," decides which tokens the tokenizer keeps before matching:",[738,1886,1887,1897],{},[741,1888,1889],{},[744,1890,1891,1894],{},[747,1892,1893],{},"Mode",[747,1895,1896],{},"Left out before matching",[757,1898,1899,1908,1921],{},[744,1900,1901,1905],{},[762,1902,1903],{},[259,1904,488],{},[762,1906,1907],{},"Whitespace. This is the default.",[744,1909,1910,1914],{},[762,1911,1912],{},[259,1913,1030],{},[762,1915,1916,1917,1920],{},"Whitespace and comments. ",[259,1918,1919],{},"--skip-comments"," on the command line is the same thing.",[744,1922,1923,1927],{},[762,1924,1925],{},[259,1926,1033],{},[762,1928,1929],{},"Nothing: every token the tokenizer produces counts, whitespace and comments included.",[255,1931,1932,1933,373,1936,1939,1940,1942,1943,1945,1946,373,1948,1950,1951,790],{},"Regions between ",[259,1934,1935],{},"jscpd:ignore-start",[259,1937,1938],{},"jscpd:ignore-end"," and the matches of ",[259,1941,584],{}," are left out in every mode. JavaScript and TypeScript comments never produce tokens, so ",[259,1944,1030],{}," changes nothing for them; it matters for the formats of the generic tokenizer, C#, Java, Go, Python and most others, where a repeated license header alone can be a clone. Modes decide what an exact clone may differ in; clones that differ in names or values need ",[259,1947,1072],{},[259,1949,1084],{},", see ",[264,1952,110],{"href":111},[284,1954,1053],{"id":1955},"ignoring-code",[255,1957,1958,1959,1962],{},"Four mechanisms, from whole files down to one region of one file. ",[259,1960,1961],{},"fixtures\u002Fignore-demo"," in the jscpd repository has one directory per mechanism, and the outputs below come from it.",[733,1964,1966],{"id":1965},"files","Files",[255,1968,1969,1971,1972,1975,1976,1979,1980,1983,1984,373,1987,428],{},[259,1970,372],{}," takes globs for files and folders to leave out; on the command line, ",[259,1973,1974],{},"--ignore"," takes them comma-separated. In the ",[259,1977,1978],{},"glob"," directory, ",[259,1981,1982],{},"src\u002Fcheckout.js"," is copied into ",[259,1985,1986],{},"vendor\u002F",[259,1988,1989],{},"generated\u002F",[396,1991,1996],{"className":1992,"code":1993,"filename":1994,"language":1995,"meta":401,"style":401},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd --ignore \"**\u002Fvendor\u002F**,**\u002Fgenerated\u002F**\" .\n","Terminal","bash",[259,1997,1998],{"__ignoreMap":401},[405,1999,2000,2002,2005,2007,2010,2012],{"class":407,"line":408},[405,2001,326],{"class":1802},[405,2003,2004],{"class":487}," --ignore",[405,2006,484],{"class":411},[405,2008,2009],{"class":487},"**\u002Fvendor\u002F**,**\u002Fgenerated\u002F**",[405,2011,425],{"class":411},[405,2013,2014],{"class":487}," .\n",[396,2016,2021],{"className":2017,"code":2019,"language":2020,"meta":401},[2018],"language-text","No duplicates found.\nFound 0 clones.\n","text",[259,2022,2019],{"__ignoreMap":401},[255,2024,2025,2026,790],{},"In the file the same setting is ",[259,2027,2028],{},"\"ignore\": [\"**\u002Fvendor\u002F**\", \"**\u002Fgenerated\u002F**\"]",[255,2030,2031,2032,373,2034,2037,2038,2041,2042,2045,2046,2048,2049,2051],{},"Inside a git repository, jscpd also skips what ",[259,2033,892],{},[259,2035,2036],{},".git\u002Finfo\u002Fexclude"," skip, so build output and vendored code are usually out already; ",[259,2039,2040],{},".ignore"," files work in any directory. ",[259,2043,2044],{},"noGitignore: true"," (",[259,2047,278],{},") turns the ",[259,2050,892],{}," part off. Dotfiles are scanned like any other file.",[733,2053,2055],{"id":2054},"a-region-of-every-file","A region of every file",[255,2057,2058,2060,2061,2067,2068,2071],{},[259,2059,584],{}," takes regular expressions. jscpd matches each one against the raw text of every file before tokenization and leaves out the tokens that overlap a match; the positions reported for the rest do not shift. The syntax is that of the ",[264,2062,2066],{"href":2063,"rel":2064},"https:\u002F\u002Fdocs.rs\u002Fregex\u002Flatest\u002Fregex\u002F#syntax",[2065],"nofollow","Rust regex crate",", which has no look-around and no backreferences, and a pattern that does not compile is skipped with a warning. The ",[259,2069,2070],{},"regex"," directory holds two C# files that share nothing except a 13-line license comment, which the generic tokenizer turns into tokens:",[396,2073,2075],{"className":398,"code":2074,"filename":261,"language":400,"meta":401,"style":401},"{\n  \"ignorePattern\": [\"(?s)\\\\A\u002F\\\\*.*?\\\\*\u002F\"]\n}\n",[259,2076,2077,2081,2113],{"__ignoreMap":401},[405,2078,2079],{"class":407,"line":408},[405,2080,412],{"class":411},[405,2082,2083,2085,2087,2089,2091,2093,2095,2097,2099,2101,2103,2105,2107,2109,2111],{"class":407,"line":415},[405,2084,418],{"class":411},[405,2086,584],{"class":421},[405,2088,425],{"class":411},[405,2090,428],{"class":411},[405,2092,507],{"class":411},[405,2094,425],{"class":411},[405,2096,595],{"class":487},[405,2098,599],{"class":598},[405,2100,602],{"class":487},[405,2102,599],{"class":598},[405,2104,607],{"class":487},[405,2106,599],{"class":598},[405,2108,612],{"class":487},[405,2110,425],{"class":411},[405,2112,1867],{"class":411},[405,2114,2115],{"class":407,"line":438},[405,2116,689],{"class":411},[396,2118,2120],{"className":1992,"code":2119,"filename":1994,"language":1995,"meta":401,"style":401},"jscpd .\n",[259,2121,2122],{"__ignoreMap":401},[405,2123,2124,2126],{"class":407,"line":408},[405,2125,326],{"class":1802},[405,2127,2014],{"class":487},[396,2129,2132],{"className":2130,"code":2131,"language":2020,"meta":401},[2018],"Using config from .jscpd.json\nNo duplicates found.\nFound 0 clones.\n",[259,2133,2131],{"__ignoreMap":401},[255,2135,2136,2137,2140,2141,2144,2145,2148],{},"JSON escaping doubles the backslashes: the expression jscpd runs is ",[259,2138,2139],{},"(?s)\\A\u002F\\*.*?\\*\u002F",", a block comment at the very start of the file. ",[259,2142,2143],{},"--ignore-pattern"," on the command line splits its value on commas, so a pattern that contains one, such as ",[259,2146,2147],{},"{1,3}",", belongs in the file.",[733,2150,2152],{"id":2151},"a-region-of-one-file","A region of one file",[255,2154,2155,2156,373,2158,2160,2161,2164],{},"Put ",[259,2157,1935],{},[259,2159,1938],{}," in comments that are valid for the language. Everything between them is left out of detection, in every mode. The ",[259,2162,2163],{},"markers"," directory marks a generated block in two Python modules:",[396,2166,2170],{"className":2167,"code":2168,"filename":2169,"language":531,"meta":401,"style":401},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"\"\"Stock report schema.\"\"\"\n\n# jscpd:ignore-start\n# --- generated by schemagen 2.4, do not edit ---\nFIELDS = (\n    (\"id\", \"integer\", False),\n    (\"sku\", \"string\", False),\n    (\"warehouse\", \"string\", False),\n    (\"quantity\", \"integer\", False),\n    (\"reserved\", \"integer\", True),\n    (\"updated_at\", \"timestamp\", False),\n)\nFIELD_NAMES = tuple(name for name, _, _ in FIELDS)\nNULLABLE = frozenset(name for name, _, nullable in FIELDS if nullable)\n# --- end generated ---\n# jscpd:ignore-end\n","schema_a.py",[259,2171,2172,2177,2183,2188,2193,2198,2203,2208,2213,2218,2223,2228,2233,2239,2245,2251],{"__ignoreMap":401},[405,2173,2174],{"class":407,"line":408},[405,2175,2176],{},"\"\"\"Stock report schema.\"\"\"\n",[405,2178,2179],{"class":407,"line":415},[405,2180,2182],{"emptyLinePlaceholder":2181},true,"\n",[405,2184,2185],{"class":407,"line":438},[405,2186,2187],{},"# jscpd:ignore-start\n",[405,2189,2190],{"class":407,"line":455},[405,2191,2192],{},"# --- generated by schemagen 2.4, do not edit ---\n",[405,2194,2195],{"class":407,"line":472},[405,2196,2197],{},"FIELDS = (\n",[405,2199,2200],{"class":407,"line":495},[405,2201,2202],{},"    (\"id\", \"integer\", False),\n",[405,2204,2205],{"class":407,"line":539},[405,2206,2207],{},"    (\"sku\", \"string\", False),\n",[405,2209,2210],{"class":407,"line":579},[405,2211,2212],{},"    (\"warehouse\", \"string\", False),\n",[405,2214,2215],{"class":407,"line":619},[405,2216,2217],{},"    (\"quantity\", \"integer\", False),\n",[405,2219,2220],{"class":407,"line":651},[405,2221,2222],{},"    (\"reserved\", \"integer\", True),\n",[405,2224,2225],{"class":407,"line":671},[405,2226,2227],{},"    (\"updated_at\", \"timestamp\", False),\n",[405,2229,2230],{"class":407,"line":686},[405,2231,2232],{},")\n",[405,2234,2236],{"class":407,"line":2235},13,[405,2237,2238],{},"FIELD_NAMES = tuple(name for name, _, _ in FIELDS)\n",[405,2240,2242],{"class":407,"line":2241},14,[405,2243,2244],{},"NULLABLE = frozenset(name for name, _, nullable in FIELDS if nullable)\n",[405,2246,2248],{"class":407,"line":2247},15,[405,2249,2250],{},"# --- end generated ---\n",[405,2252,2254],{"class":407,"line":2253},16,[405,2255,2256],{},"# jscpd:ignore-end\n",[255,2258,2259,2260,373,2263,2266,2267,373,2270,2273,2274,2277],{},"In JavaScript the markers are ",[259,2261,2262],{},"\u002F\u002F jscpd:ignore-start",[259,2264,2265],{},"\u002F\u002F jscpd:ignore-end",", in HTML and Markdown ",[259,2268,2269],{},"\u003C!-- jscpd:ignore-start -->",[259,2271,2272],{},"\u003C!-- jscpd:ignore-end -->",". The ",[264,2275,2276],{"href":66},"language server"," inserts them for you with its \"Ignore this clone\" action.",[284,2279,2280],{"id":821},"Formats",[255,2282,2283,2285,2286,2288,2289,2291,2292,301,2295,2298,2299,2301,2302,2304,2305,2307],{},[259,2284,500],{}," names the formats to scan; without it jscpd scans every format it knows. ",[259,2287,829],{}," maps extra extensions to a format and ",[259,2290,848],{}," maps file names such as ",[259,2293,2294],{},"Makefile",[259,2296,2297],{},"Dockerfile"," to one. ",[264,2300,182],{"href":183}," lists the names, the extensions and the shebang lines that select each format, and ",[264,2303,873],{"href":56}," explains ",[259,2306,864],{}," and the files that embed several languages.",[284,2309,100],{"id":383},[255,2311,2312,2314,2315,2317],{},[259,2313,383],{}," holds rules that keep the code of a module, a folder, a file or a method inside its boundary. Every clone run checks them and exits with code 1 when a copy of protected code shows up in a place a rule keeps it out of. ",[264,2316,100],{"href":101}," walks through an example with its output. Each rule is an object with these keys:",[738,2319,2320,2330],{},[741,2321,2322],{},[744,2323,2324,2326,2328],{},[747,2325,749],{},[747,2327,752],{},[747,2329,755],{},[757,2331,2332,2343,2372,2387,2402,2429],{},[744,2333,2334,2338,2340],{},[762,2335,2336],{},[259,2337,1768],{},[762,2339,780],{},[762,2341,2342],{},"The rule's name in the reports and in the error line. Required, and two rules can't share one.",[744,2344,2345,2349,2351],{},[762,2346,2347],{},[259,2348,259],{},[762,2350,768],{},[762,2352,2353,2354,2357,2358,2361,2362,275,2365,373,2368,2371],{},"What the rule protects: folders, files and globs, ",[259,2355,2356],{},"path#name"," for one method of the matching files, and ",[259,2359,2360],{},"path#(pattern)"," for every method whose name matches, with ",[259,2363,2364],{},"*",[259,2366,2367],{},"?",[259,2369,2370],{},"{a,b}",". Required and not empty.",[744,2373,2374,2379,2381],{},[762,2375,2376],{},[259,2377,2378],{},"notIn",[762,2380,768],{},[762,2382,2383,2384,2386],{},"Globs of the places copies must stay out of. Without it, every file outside ",[259,2385,259],{}," counts. Not empty when set.",[744,2388,2389,2394,2396],{},[762,2390,2391],{},[259,2392,2393],{},"allow",[762,2395,768],{},[762,2397,2398,2399,2401],{},"Globs of the places where copies may stay although ",[259,2400,2378],{}," covers them, such as end-to-end tests.",[744,2403,2404,2409,2411],{},[762,2405,2406],{},[259,2407,2408],{},"thresholds",[762,2410,1638],{},[762,2412,2413,2414,275,2416,275,2418,275,2420,275,2422,373,2425,2428],{},"The rule's own ",[259,2415,443],{},[259,2417,460],{},[259,2419,1143],{},[259,2421,1128],{},[259,2423,2424],{},"semanticThreshold",[259,2426,2427],{},"semanticSameThreshold",", each in place of the project's setting.",[744,2430,2431,2436,2438],{},[762,2432,2433],{},[259,2434,2435],{},"disable",[762,2437,768],{},[762,2439,2440,2441,2443,2444,275,2446,275,2448,275,2450,275,2452,2454,2455,373,2457,2459,2460,790],{},"The kinds of copy the rule doesn't look for, by the names of ",[259,2442,1158],{},": ",[259,2445,1166],{},[259,2447,1169],{},[259,2449,1175],{},[259,2451,1178],{},[259,2453,1172],{}," for both ",[259,2456,1175],{},[259,2458,1178],{},", and ",[259,2461,1181],{},[396,2463,2465],{"className":398,"code":2464,"filename":261,"language":400,"meta":401,"style":401},"{\n  \"boundaries\": [\n    {\n      \"name\": \"money\",\n      \"code\": [\"backend\u002Fbilling\", \"backend\u002Floans\u002Fsrc\u002Fmain\u002Fkotlin\u002FInterest.kt#(*Payments)\"],\n      \"notIn\": [\"web\u002F**\", \"mobile\u002F**\"],\n      \"allow\": [\"web\u002Fe2e\u002F**\"],\n      \"thresholds\": { \"minTokens\": 30, \"similarity\": 0.7 }\n    },\n    { \"name\": \"auth\", \"code\": [\"packages\u002Fauth\"], \"disable\": [\"semantic\"] }\n  ]\n}\n",[259,2466,2467,2471,2484,2489,2509,2539,2569,2590,2630,2635,2698,2703],{"__ignoreMap":401},[405,2468,2469],{"class":407,"line":408},[405,2470,412],{"class":411},[405,2472,2473,2475,2477,2479,2481],{"class":407,"line":415},[405,2474,418],{"class":411},[405,2476,383],{"class":421},[405,2478,425],{"class":411},[405,2480,428],{"class":411},[405,2482,2483],{"class":411}," [\n",[405,2485,2486],{"class":407,"line":438},[405,2487,2488],{"class":411},"    {\n",[405,2490,2491,2494,2496,2498,2500,2502,2505,2507],{"class":407,"line":455},[405,2492,2493],{"class":411},"      \"",[405,2495,1768],{"class":1802},[405,2497,425],{"class":411},[405,2499,428],{"class":411},[405,2501,484],{"class":411},[405,2503,2504],{"class":487},"money",[405,2506,425],{"class":411},[405,2508,435],{"class":411},[405,2510,2511,2513,2515,2517,2519,2521,2523,2526,2528,2530,2532,2535,2537],{"class":407,"line":472},[405,2512,2493],{"class":411},[405,2514,259],{"class":1802},[405,2516,425],{"class":411},[405,2518,428],{"class":411},[405,2520,507],{"class":411},[405,2522,425],{"class":411},[405,2524,2525],{"class":487},"backend\u002Fbilling",[405,2527,425],{"class":411},[405,2529,517],{"class":411},[405,2531,484],{"class":411},[405,2533,2534],{"class":487},"backend\u002Floans\u002Fsrc\u002Fmain\u002Fkotlin\u002FInterest.kt#(*Payments)",[405,2536,425],{"class":411},[405,2538,536],{"class":411},[405,2540,2541,2543,2545,2547,2549,2551,2553,2556,2558,2560,2562,2565,2567],{"class":407,"line":495},[405,2542,2493],{"class":411},[405,2544,2378],{"class":1802},[405,2546,425],{"class":411},[405,2548,428],{"class":411},[405,2550,507],{"class":411},[405,2552,425],{"class":411},[405,2554,2555],{"class":487},"web\u002F**",[405,2557,425],{"class":411},[405,2559,517],{"class":411},[405,2561,484],{"class":411},[405,2563,2564],{"class":487},"mobile\u002F**",[405,2566,425],{"class":411},[405,2568,536],{"class":411},[405,2570,2571,2573,2575,2577,2579,2581,2583,2586,2588],{"class":407,"line":539},[405,2572,2493],{"class":411},[405,2574,2393],{"class":1802},[405,2576,425],{"class":411},[405,2578,428],{"class":411},[405,2580,507],{"class":411},[405,2582,425],{"class":411},[405,2584,2585],{"class":487},"web\u002Fe2e\u002F**",[405,2587,425],{"class":411},[405,2589,536],{"class":411},[405,2591,2592,2594,2596,2598,2600,2603,2605,2607,2609,2611,2614,2616,2618,2620,2622,2624,2627],{"class":407,"line":579},[405,2593,2493],{"class":411},[405,2595,2408],{"class":1802},[405,2597,425],{"class":411},[405,2599,428],{"class":411},[405,2601,2602],{"class":411}," {",[405,2604,484],{"class":411},[405,2606,443],{"class":431},[405,2608,425],{"class":411},[405,2610,428],{"class":411},[405,2612,2613],{"class":431}," 30",[405,2615,517],{"class":411},[405,2617,484],{"class":411},[405,2619,1128],{"class":431},[405,2621,425],{"class":411},[405,2623,428],{"class":411},[405,2625,2626],{"class":431}," 0.7",[405,2628,2629],{"class":411}," }\n",[405,2631,2632],{"class":407,"line":619},[405,2633,2634],{"class":411},"    },\n",[405,2636,2637,2640,2642,2644,2646,2648,2650,2653,2655,2657,2659,2661,2663,2665,2667,2669,2672,2674,2677,2679,2681,2683,2685,2687,2689,2691,2693,2696],{"class":407,"line":651},[405,2638,2639],{"class":411},"    {",[405,2641,484],{"class":411},[405,2643,1768],{"class":1802},[405,2645,425],{"class":411},[405,2647,428],{"class":411},[405,2649,484],{"class":411},[405,2651,2652],{"class":487},"auth",[405,2654,425],{"class":411},[405,2656,517],{"class":411},[405,2658,484],{"class":411},[405,2660,259],{"class":1802},[405,2662,425],{"class":411},[405,2664,428],{"class":411},[405,2666,507],{"class":411},[405,2668,425],{"class":411},[405,2670,2671],{"class":487},"packages\u002Fauth",[405,2673,425],{"class":411},[405,2675,2676],{"class":411},"],",[405,2678,484],{"class":411},[405,2680,2435],{"class":1802},[405,2682,425],{"class":411},[405,2684,428],{"class":411},[405,2686,507],{"class":411},[405,2688,425],{"class":411},[405,2690,1181],{"class":487},[405,2692,425],{"class":411},[405,2694,2695],{"class":411},"]",[405,2697,2629],{"class":411},[405,2699,2700],{"class":407,"line":671},[405,2701,2702],{"class":411},"  ]\n",[405,2704,2705],{"class":407,"line":686},[405,2706,689],{"class":411},[255,2708,2709,2710,2712,2713,2716,2717,2720,2721,2723,2724,2726],{},"Paths and globs start in the directory of the config file, which is the working directory for a file jscpd finds there. A folder stands for everything in it, ",[259,2711,2364],{}," stays in one folder and ",[259,2714,2715],{},"**"," crosses folders, and square brackets match as written as well as a set of characters. jscpd finds methods in the languages of ",[259,2718,2719],{},"--semantic",", and in other formats ",[259,2722,259],{}," takes whole files. Unlike the other keys, a mistake in a rule stops the run with exit code 1: an unknown key, an empty list, a glob that doesn't compile, a threshold out of range, an unknown kind in ",[259,2725,2435],{},", two rules with one name.",[284,2728,2730],{"id":2729},"checking-the-merged-config","Checking the merged config",[255,2732,2733,2735],{},[259,2734,711],{}," prints the configuration a run would use, file and flags merged, and exits without scanning:",[396,2737,2739],{"className":1992,"code":2738,"filename":1994,"language":1995,"meta":401,"style":401},"jscpd --debug\n",[259,2740,2741],{"__ignoreMap":401},[405,2742,2743,2745],{"class":407,"line":408},[405,2744,326],{"class":1802},[405,2746,2747],{"class":487}," --debug\n",[396,2749,2752],{"className":2750,"code":2751,"language":2020,"meta":401},[2018],"Using config from .jscpd.json\n{\n  \"paths\": [\n    \".\"\n  ],\n  \"min_tokens\": 50,\n  \"min_lines\": 5,\n  \"max_lines\": null,\n  \"max_gap_lines\": 0,\n  \"similarity\": 1.0,\n  \"semantic\": null,\n  \"kind\": [],\n  \"mode\": \"mild\",\n  \"formats\": [],\n  \"ignore\": [],\n  \"ignore_patterns\": [\n    \"(?s)\\\\A\u002F\\\\*.*?\\\\*\u002F\"\n  ],\n  \"reporters\": [\n    \"console\"\n  ],\n  \"output_dir\": \"report\",\n",[259,2753,2751],{"__ignoreMap":401},[255,2755,2756,2757,2759,2760,2762,2763,275,2766,2768,2769,275,2772,2768,2774,373,2777,2768,2779,2781],{},"The output goes on with every other setting; this is its start in the ",[259,2758,2070],{}," directory above. The names in it are the internal ones and differ from the file's keys: ",[259,2761,443],{}," shows as ",[259,2764,2765],{},"min_tokens",[259,2767,368],{}," as ",[259,2770,2771],{},"output_dir",[259,2773,584],{},[259,2775,2776],{},"ignore_patterns",[259,2778,500],{},[259,2780,821],{},". A key you set that is missing here was misspelled, and the warning above the JSON names it.",[284,2783,2785],{"id":2784},"recipes","Recipes",[2787,2788,2789,2795,2801,2807,2813],"ul",{},[295,2790,2791,2794],{},[259,2792,2793],{},"jscpd --pattern \"src\u002F**\u002F*.ts\" ."," scans only the files a glob matches.",[295,2796,2797,2800],{},[259,2798,2799],{},"jscpd --formats-names \"makefile:Makefile,GNUmakefile;docker:Dockerfile\" ."," gives files without an extension a format.",[295,2802,2803,2806],{},[259,2804,2805],{},"jscpd --max-size 5mb ."," raises the file size above which files are skipped.",[295,2808,2809,2812],{},[259,2810,2811],{},"jscpd --ignore-case ."," compares tokens without regard to case (experimental).",[295,2814,2815,2818],{},[259,2816,2817],{},"jscpd --follow-symlinks ."," scans through symbolic links; a file reachable by several paths counts once.",[284,2820,2822],{"id":2821},"see-also","See also",[2787,2824,2825,2830,2835],{},[295,2826,2827,2829],{},[264,2828,130],{"href":131},": every flag with its config key and default.",[295,2831,2832,2834],{},[264,2833,25],{"href":26},": the five or six keys to set first.",[295,2836,2837,2839,2840,275,2842,275,2844,275,2846,373,2848,2850],{},[264,2838,140],{"href":141},": what ",[259,2841,422],{},[259,2843,1422],{},[259,2845,1447],{},[259,2847,1464],{},[259,2849,383],{}," do to the exit status.",[2852,2853,2854],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":401,"searchDepth":415,"depth":415,"links":2856},[2857,2858,2865,2866,2867,2872,2873,2874,2875,2876],{"id":286,"depth":415,"text":287},{"id":387,"depth":415,"text":388,"children":2859},[2860,2861,2862,2863,2864],{"id":735,"depth":438,"text":736},{"id":978,"depth":438,"text":979},{"id":1227,"depth":438,"text":1228},{"id":1389,"depth":438,"text":1390},{"id":1500,"depth":438,"text":1501},{"id":1739,"depth":415,"text":1740},{"id":1879,"depth":415,"text":1038},{"id":1955,"depth":415,"text":1053,"children":2868},[2869,2870,2871],{"id":1965,"depth":438,"text":1966},{"id":2054,"depth":438,"text":2055},{"id":2151,"depth":438,"text":2152},{"id":821,"depth":415,"text":2280},{"id":383,"depth":415,"text":100},{"id":2729,"depth":415,"text":2730},{"id":2784,"depth":415,"text":2785},{"id":2821,"depth":415,"text":2822},"Every key of .jscpd.json and the jscpd section of package.json, where jscpd looks for them, and how they combine with the command line.","md",null,{},{"icon":138},{"title":135,"description":2883},"Reference for .jscpd.json and the jscpd key of package.json, config discovery, detection modes, ignore globs, ignore patterns and inline markers.","IMZU1I6p11poscmenlXpkGnidpSH5mXMYyp0YFj3fBQ",[2886,2888],{"title":130,"path":131,"stem":132,"description":2887,"icon":133,"children":-1},"Every flag of the jscpd command line, with its config key and default, generated from the help text of jscpd 5.4.3.",{"title":140,"path":141,"stem":142,"description":2889,"icon":143,"children":-1},"What makes a jscpd run exit with 0, 1, 2 or a code of your own, and which flag controls each case.",{"\u002Freference\u002Fconfig-file":2891},{"views":2892,"visits":2893},182,76,1795510268177]