[{"data":1,"prerenderedAt":1095},["ShallowReactive",2],{"navigation_docs":3,"-guides-monorepos":239,"-guides-monorepos-surround":1090},[4,29,94,114,184],{"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],{"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,"icon":6,"path":96,"stem":97,"children":98,"page":6},"Concepts","\u002Fconcepts","3.concepts",[99,104,109],{"title":100,"path":101,"stem":102,"icon":103},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":105,"path":106,"stem":107,"icon":108},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":110,"path":111,"stem":112,"icon":113},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":115,"icon":6,"path":116,"stem":117,"children":118,"page":6},"Reference","\u002Freference","4.reference",[119,124,129,134,171,176,180],{"title":120,"path":121,"stem":122,"icon":123},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":125,"path":126,"stem":127,"icon":128},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":130,"path":131,"stem":132,"icon":133},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":135,"icon":6,"path":136,"stem":137,"children":138},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[139,141,146,151,156,161,166],{"title":135,"path":136,"stem":137,"icon":140},"i-lucide-file-chart-column",{"title":142,"path":143,"stem":144,"icon":145},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":147,"path":148,"stem":149,"icon":150},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":152,"path":153,"stem":154,"icon":155},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":157,"path":158,"stem":159,"icon":160},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":162,"path":163,"stem":164,"icon":165},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":167,"path":168,"stem":169,"icon":170},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":172,"path":173,"stem":174,"icon":175},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":177,"path":178,"stem":179,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":181,"path":182,"stem":183,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":185,"icon":6,"path":186,"stem":187,"children":188,"page":6},"Project","\u002Fproject","5.project",[189,194,199,204,229,234],{"title":190,"path":191,"stem":192,"icon":193},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":195,"path":196,"stem":197,"icon":198},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":200,"path":201,"stem":202,"icon":203},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":205,"icon":6,"path":206,"stem":207,"children":208},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[209,211,216,220,225],{"title":205,"path":206,"stem":207,"icon":210},"i-lucide-gauge",{"title":212,"path":213,"stem":214,"icon":215},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":217,"path":218,"stem":219,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":221,"path":222,"stem":223,"icon":224},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":226,"path":227,"stem":228,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":230,"path":231,"stem":232,"icon":233},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":235,"path":236,"stem":237,"icon":238},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"id":240,"title":50,"body":241,"description":1081,"extension":1082,"links":1083,"meta":1084,"navigation":1085,"path":51,"seo":1086,"stem":52,"__hash__":1089},"docs\u002F2.guides\u002F04.monorepos.md",{"type":242,"value":243,"toc":1069},"minimark",[244,248,330,346,351,374,382,388,415,421,431,460,466,473,477,504,508,513,538,544,570,574,696,736,740,812,839,843,886,890,1029,1036,1040,1065],[245,246,247],"p",{},"In a repository of many packages a clone means different things depending on where its two halves live. Inside one package it is a refactoring for that team; across two packages it is a candidate for a shared library; between packages owned by different teams it may be a copy both sides made on purpose. One scan reports all of them, and the question this page answers is how to keep the ones you will act on. The examples run on a small layout with two kinds of copy:",[249,250,251,264],"table",{},[252,253,254],"thead",{},[255,256,257,261],"tr",{},[258,259,260],"th",{},"File",[258,262,263],{},"What it holds",[265,266,267,281,294,306,318],"tbody",{},[255,268,269,276],{},[270,271,272],"td",{},[273,274,275],"code",{},"packages\u002Fbilling\u002Fsrc\u002Finvoice.js",[270,277,278],{},[273,279,280],{},"total()",[255,282,283,288],{},[270,284,285],{},[273,286,287],{},"packages\u002Fbilling\u002Fsrc\u002Freceipt.js",[270,289,290,291,293],{},"the same ",[273,292,280],{},", a copy inside the package",[255,295,296,301],{},[270,297,298],{},[273,299,300],{},"packages\u002Fshipping\u002Fsrc\u002Flabels.js",[270,302,290,303,305],{},[273,304,280],{},", a copy in another package",[255,307,308,313],{},[270,309,310],{},[273,311,312],{},"shared\u002Fsrc\u002Fmoney.js",[270,314,315],{},[273,316,317],{},"formatMoney()",[255,319,320,325],{},[270,321,322],{},[273,323,324],{},"packages\u002Fshipping\u002Fsrc\u002Frates.js",[270,326,290,327,329],{},[273,328,317],{},", copied from the shared library",[331,332,333,336,337,340,341,345],"note",{},[273,334,335],{},"--skip-local"," is in every jscpd 5 release (jscpd 5.0.10 restored the jscpd 4 rule of matching per scan path); ",[273,338,339],{},"--skip-isolated"," is available from jscpd ",[342,343,344],"strong",{},"5.0.16",". Neither needs anything beyond the binary.",[347,348,350],"h2",{"id":349},"run-it","Run it",[352,353,359],"pre",{"className":354,"code":355,"filename":356,"language":357,"meta":358,"style":358},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd .\n","Terminal","bash","",[273,360,361],{"__ignoreMap":358},[362,363,366,370],"span",{"class":364,"line":365},"line",1,[362,367,369],{"class":368},"sBMFI","jscpd",[362,371,373],{"class":372},"sfazB"," .\n",[352,375,380],{"className":376,"code":378,"language":379,"meta":358},[377],"language-text","Clone found (javascript)\n - packages\u002Fbilling\u002Fsrc\u002Finvoice.js [1:1 - 12:20] (12 lines, 83 tokens)\n   packages\u002Fbilling\u002Fsrc\u002Freceipt.js [1:1 - 12:20]\nClone found (javascript)\n - packages\u002Fbilling\u002Fsrc\u002Finvoice.js [1:1 - 12:20] (12 lines, 83 tokens)\n   packages\u002Fshipping\u002Fsrc\u002Flabels.js [1:1 - 12:20]\nClone found (javascript)\n - packages\u002Fshipping\u002Fsrc\u002Frates.js [1:1 - 9:13] (9 lines, 88 tokens)\n   shared\u002Fsrc\u002Fmoney.js [1:1 - 9:13]\nFound 3 clones.\n","text",[273,381,378],{"__ignoreMap":358},[245,383,384,385,387],{},"All three pairs, as a plain scan should. ",[273,386,335],{}," keeps the clones that cross from one scan path to another and drops the pairs inside one path, so each package goes on the command line as a path of its own:",[352,389,391],{"className":354,"code":390,"filename":356,"language":357,"meta":358,"style":358},"jscpd packages\u002Fbilling packages\u002Fshipping shared --skip-local --reporters ai\n",[273,392,393],{"__ignoreMap":358},[362,394,395,397,400,403,406,409,412],{"class":364,"line":365},[362,396,369],{"class":368},[362,398,399],{"class":372}," packages\u002Fbilling",[362,401,402],{"class":372}," packages\u002Fshipping",[362,404,405],{"class":372}," shared",[362,407,408],{"class":372}," --skip-local",[362,410,411],{"class":372}," --reporters",[362,413,414],{"class":372}," ai\n",[352,416,419],{"className":417,"code":418,"language":379,"meta":358},[377],"Clones:\nsrc\u002F invoice.js:1-12 ~ labels.js:1-12\nsrc\u002F rates.js:1-9 ~ money.js:1-9\n---\n2 clones · 38.9% duplication\n",[273,420,418],{"__ignoreMap":358},[245,422,423,424,427,428,430],{},"The pair inside ",[273,425,426],{},"packages\u002Fbilling"," is gone. ",[273,429,339],{}," draws the line between named folders instead: clones between members of a group are skipped, and clones inside a member or against anything outside the group stay.",[352,432,434],{"className":354,"code":433,"filename":356,"language":357,"meta":358,"style":358},"jscpd . --skip-isolated \"packages\u002Fbilling|packages\u002Fshipping\" --reporters ai\n",[273,435,436],{"__ignoreMap":358},[362,437,438,440,443,446,450,453,456,458],{"class":364,"line":365},[362,439,369],{"class":368},[362,441,442],{"class":372}," .",[362,444,445],{"class":372}," --skip-isolated",[362,447,449],{"class":448},"sMK4o"," \"",[362,451,452],{"class":372},"packages\u002Fbilling|packages\u002Fshipping",[362,454,455],{"class":448},"\"",[362,457,411],{"class":372},[362,459,414],{"class":372},[352,461,464],{"className":462,"code":463,"language":379,"meta":358},[377],"Clones:\npackages\u002Fbilling\u002Fsrc\u002F invoice.js:1-12 ~ receipt.js:1-12\npackages\u002Fshipping\u002Fsrc\u002Frates.js:1-9 ~ shared\u002Fsrc\u002Fmoney.js:1-9\n---\n2 clones · 38.9% duplication\n",[273,465,463],{"__ignoreMap":358},[245,467,468,469,472],{},"Now the pair between billing and shipping is gone, the copy inside billing is back, and the copy from the shared library is reported in both runs, because ",[273,470,471],{},"shared"," belongs to no group.",[347,474,476],{"id":475},"reading-the-output","Reading the output",[245,478,479,480,483,484,487,488,491,492,495,496,499,500,503],{},"The ",[273,481,482],{},"ai"," reporter prints the common prefix of a pair once and then the two fragments, ",[273,485,486],{},"packages\u002F billing\u002Fsrc\u002Finvoice.js:1-12 ~ shipping\u002Fsrc\u002Flabels.js:1-12",", which is why it suits a log with many packages. With several scan paths, jscpd reports each file relative to its own scan path, which is where the ",[273,489,490],{},"src\u002Finvoice.js"," and ",[273,493,494],{},"src\u002Flabels.js"," of the second run come from; ",[273,497,498],{},"--absolute"," prints full paths when that is ambiguous. The duplication percentage counts the reported clones only, 61.1 % in the first run and 38.9 % in the other two, so a ",[273,501,502],{},"--threshold"," measures what is left after the skips.",[347,505,507],{"id":506},"common-tasks","Common tasks",[509,510,512],"h3",{"id":511},"which-package-holds-the-duplication","Which package holds the duplication",[352,514,516],{"className":354,"code":515,"filename":356,"language":357,"meta":358,"style":358},"jscpd . --summary --summary-top 2 --reporters ai\n",[273,517,518],{"__ignoreMap":358},[362,519,520,522,524,527,530,534,536],{"class":364,"line":365},[362,521,369],{"class":368},[362,523,442],{"class":372},[362,525,526],{"class":372}," --summary",[362,528,529],{"class":372}," --summary-top",[362,531,533],{"class":532},"sbssI"," 2",[362,535,411],{"class":372},[362,537,414],{"class":372},[352,539,542],{"className":540,"code":541,"language":379,"meta":358},[377],"Clones:\npackages\u002Fbilling\u002Fsrc\u002F invoice.js:1-12 ~ receipt.js:1-12\npackages\u002F billing\u002Fsrc\u002Finvoice.js:1-12 ~ shipping\u002Fsrc\u002Flabels.js:1-12\npackages\u002Fshipping\u002Fsrc\u002Frates.js:1-9 ~ shared\u002Fsrc\u002Fmoney.js:1-9\n---\n3 clones · 61.1% duplication\n---\nSummary by tokens (5 files, 3 folders):\nfiles (tokens\u002Flines\u002Fsize\u002Fcx\u002Fdup%):\npackages\u002Fshipping\u002Fsrc\u002Frates.js 92\u002F9\u002F342\u002F3\u002F100.0%\nshared\u002Fsrc\u002Fmoney.js 92\u002F9\u002F344\u002F3\u002F100.0%\nfolders (files\u002Ftokens\u002Flines\u002Fsize):\npackages\u002Fshipping\u002Fsrc 2\u002F177\u002F21\u002F664\npackages\u002Fbilling\u002Fsrc 2\u002F170\u002F24\u002F648\n",[273,543,541],{"__ignoreMap":358},[245,545,546,549,550,553,554,557,558,561,562,565,566,569],{},[273,547,548],{},"--summary"," appends the largest files and folders with their size, complexity and, for files, the share of lines inside clones; ",[273,551,552],{},"--summary-by lines",", ",[273,555,556],{},"size"," or ",[273,559,560],{},"complexity"," changes the ranking, and the ",[273,563,564],{},"console"," reporter prints the same lists as tables. Folders aggregate their direct children, so the rows are the leaf directories; a large file with a high ",[273,567,568],{},"dup%"," is the first refactoring target.",[509,571,573],{"id":572},"one-configuration-for-the-whole-repository","One configuration for the whole repository",[352,575,580],{"className":576,"code":577,"filename":578,"language":579,"meta":358,"style":358},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"ignore\": [\"**\u002Fnode_modules\u002F**\", \"**\u002Fdist\u002F**\"],\n  \"skipIsolated\": [[\"packages\u002Fbilling\", \"packages\u002Fshipping\"]],\n  \"reporters\": [\"console\", \"sarif\"]\n}\n",".jscpd.json","json",[273,581,582,587,625,658,690],{"__ignoreMap":358},[362,583,584],{"class":364,"line":365},[362,585,586],{"class":448},"{\n",[362,588,590,593,597,599,602,605,607,610,612,615,617,620,622],{"class":364,"line":589},2,[362,591,592],{"class":448},"  \"",[362,594,596],{"class":595},"spNyl","ignore",[362,598,455],{"class":448},[362,600,601],{"class":448},":",[362,603,604],{"class":448}," [",[362,606,455],{"class":448},[362,608,609],{"class":372},"**\u002Fnode_modules\u002F**",[362,611,455],{"class":448},[362,613,614],{"class":448},",",[362,616,449],{"class":448},[362,618,619],{"class":372},"**\u002Fdist\u002F**",[362,621,455],{"class":448},[362,623,624],{"class":448},"],\n",[362,626,628,630,633,635,637,640,642,644,646,648,650,653,655],{"class":364,"line":627},3,[362,629,592],{"class":448},[362,631,632],{"class":595},"skipIsolated",[362,634,455],{"class":448},[362,636,601],{"class":448},[362,638,639],{"class":448}," [[",[362,641,455],{"class":448},[362,643,426],{"class":372},[362,645,455],{"class":448},[362,647,614],{"class":448},[362,649,449],{"class":448},[362,651,652],{"class":372},"packages\u002Fshipping",[362,654,455],{"class":448},[362,656,657],{"class":448},"]],\n",[362,659,661,663,666,668,670,672,674,676,678,680,682,685,687],{"class":364,"line":660},4,[362,662,592],{"class":448},[362,664,665],{"class":595},"reporters",[362,667,455],{"class":448},[362,669,601],{"class":448},[362,671,604],{"class":448},[362,673,455],{"class":448},[362,675,564],{"class":372},[362,677,455],{"class":448},[362,679,614],{"class":448},[362,681,449],{"class":448},[362,683,684],{"class":372},"sarif",[362,686,455],{"class":448},[362,688,689],{"class":448},"]\n",[362,691,693],{"class":364,"line":692},5,[362,694,695],{"class":448},"}\n",[245,697,698,699,701,702,705,706,709,710,713,714,716,717,720,721,724,725,727,728,731,732,735],{},"jscpd reads ",[273,700,578],{}," from the directory you run it in, or the file ",[273,703,704],{},"--config"," names, so a root config applies to ",[273,707,708],{},"jscpd ."," from the root and to a run from inside a package only with ",[273,711,712],{},"--config ..\u002F..\u002F.jscpd.json",". ",[273,715,632],{}," takes nested arrays, one per group, and ",[273,718,719],{},"\"skipLocal\": true"," is the other flag. Inside a git checkout jscpd already skips what ",[273,722,723],{},".gitignore"," lists; the ",[273,726,596],{}," patterns matter outside git or with ",[273,729,730],{},"--no-gitignore",", where the ",[273,733,734],{},"node_modules"," of every package would be scanned.",[347,737,739],{"id":738},"in-ci","In CI",[352,741,746],{"className":742,"code":743,"filename":744,"language":745,"meta":358,"style":358},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","- uses: kucherenko\u002Fjscpd@v5\n  with:\n    path: packages\u002Fbilling packages\u002Fshipping shared\n    skip-local: true\n    config: .jscpd.json\n    threshold: 3\n",".github\u002Fworkflows\u002Fjscpd.yml","yaml",[273,747,748,762,770,780,791,801],{"__ignoreMap":358},[362,749,750,753,757,759],{"class":364,"line":365},[362,751,752],{"class":448},"-",[362,754,756],{"class":755},"swJcz"," uses",[362,758,601],{"class":448},[362,760,761],{"class":372}," kucherenko\u002Fjscpd@v5\n",[362,763,764,767],{"class":364,"line":589},[362,765,766],{"class":755},"  with",[362,768,769],{"class":448},":\n",[362,771,772,775,777],{"class":364,"line":627},[362,773,774],{"class":755},"    path",[362,776,601],{"class":448},[362,778,779],{"class":372}," packages\u002Fbilling packages\u002Fshipping shared\n",[362,781,782,785,787],{"class":364,"line":660},[362,783,784],{"class":755},"    skip-local",[362,786,601],{"class":448},[362,788,790],{"class":789},"sfNiH"," true\n",[362,792,793,796,798],{"class":364,"line":692},[362,794,795],{"class":755},"    config",[362,797,601],{"class":448},[362,799,800],{"class":372}," .jscpd.json\n",[362,802,804,807,809],{"class":364,"line":803},6,[362,805,806],{"class":755},"    threshold",[362,808,601],{"class":448},[362,810,811],{"class":532}," 3\n",[245,813,814,817,818,821,822,825,826,829,830,833,834,838],{},[273,815,816],{},"path"," takes several space-separated paths, so this is the second run above as a check, with the isolation groups coming from the config file: the Action has no ",[273,819,820],{},"skip-isolated"," input, so the groups go through ",[273,823,824],{},"config"," or through ",[273,827,828],{},"extra-args: --skip-isolated \"packages\u002Fbilling|packages\u002Fshipping\"",". For a gate per package, a matrix over the package names with ",[273,831,832],{},"path: packages\u002F${{ matrix.package }}"," gives each one its own threshold and its own check in the pull request. The ",[835,836,837],"a",{"href":178},"GitHub Action reference"," lists the inputs.",[347,840,842],{"id":841},"limits","Limits",[844,845,846,856,869,875],"ul",{},[847,848,849,851,852,855],"li",{},[273,850,335],{}," needs two or more paths; with one path every clone lies inside it, and ",[273,853,854],{},"jscpd . --skip-local"," reports nothing.",[847,857,858,860,861,864,865,868],{},[273,859,339],{}," matches folders by path prefix, written as you would type them on the command line, relative to the current directory: from inside ",[273,862,863],{},"packages\u002F",", the group is ",[273,866,867],{},"billing|shipping",".",[847,870,871,872,874],{},"Skipped clones leave the statistics too, so the percentage, ",[273,873,502],{}," and the baseline see only what stays.",[847,876,877,553,880,883,884,868],{},[273,878,879],{},"--format",[273,881,882],{},"--ignore"," and the thresholds apply to the whole run. When packages need different settings, run jscpd once per package with its own ",[273,885,704],{},[347,887,889],{"id":888},"options","Options",[249,891,892,908],{},[252,893,894],{},[255,895,896,899,902,905],{},[258,897,898],{},"Flag",[258,900,901],{},"Config key",[258,903,904],{},"Effect",[258,906,907],{},"Default",[265,909,910,927,951,969,1013],{},[255,911,912,916,921,924],{},[270,913,914],{},[273,915,335],{},[270,917,918],{},[273,919,920],{},"skipLocal",[270,922,923],{},"Drop clones whose two fragments lie under the same scan path",[270,925,926],{},"off",[255,928,929,934,938,948],{},[270,930,931],{},[273,932,933],{},"--skip-isolated \u003CGROUPS>",[270,935,936],{},[273,937,632],{},[270,939,940,941,943,944,947],{},"Drop clones between folders of one group; ",[273,942,614],{}," separates groups, ",[273,945,946],{},"|"," separates the folders of a group (5.0.16+)",[270,949,950],{},"none",[255,952,953,958,962,967],{},[270,954,955],{},[273,956,957],{},"--ignore \u003CGLOBS>",[270,959,960],{},[273,961,596],{},[270,963,964,965],{},"Leave out the files these comma-separated globs match, on top of ",[273,966,723],{},[270,968,950],{},[255,970,971,981,992,1005],{},[270,972,973,553,975,553,978],{},[273,974,548],{},[273,976,977],{},"--summary-top \u003CN>",[273,979,980],{},"--summary-by \u003CMETRIC>",[270,982,983,553,986,553,989],{},[273,984,985],{},"summary",[273,987,988],{},"summaryTop",[273,990,991],{},"summaryBy",[270,993,994,995,553,998,553,1001,557,1003],{},"Append the top files and folders, N rows per list, ranked by ",[273,996,997],{},"tokens",[273,999,1000],{},"lines",[273,1002,556],{},[273,1004,560],{},[270,1006,1007,1008,553,1011],{},"off, ",[273,1009,1010],{},"10",[273,1012,997],{},[255,1014,1015,1019,1024,1027],{},[270,1016,1017],{},[273,1018,498],{},[270,1020,1021],{},[273,1022,1023],{},"absolute",[270,1025,1026],{},"Report full paths",[270,1028,926],{},[245,1030,1031,1033,1034,868],{},[835,1032,120],{"href":121}," has every flag with its default; the keys go in ",[835,1035,578],{"href":126},[347,1037,1039],{"id":1038},"related","Related",[844,1041,1042,1047,1052,1057],{},[847,1043,1044,1046],{},[835,1045,35],{"href":36}," for the workflow around the per-package check.",[847,1048,1049,1051],{},[835,1050,45],{"href":46}," when the packages carry duplication you will not remove now.",[847,1053,1054,1056],{},[835,1055,55],{"href":56}," when a JavaScript package and a TypeScript package share code.",[847,1058,1059,1062,1063,868],{},[835,1060,1061],{"href":26},"Configuration"," for the keys to set first in a root ",[273,1064,578],{},[1066,1067,1068],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":358,"searchDepth":589,"depth":589,"links":1070},[1071,1072,1073,1077,1078,1079,1080],{"id":349,"depth":589,"text":350},{"id":475,"depth":589,"text":476},{"id":506,"depth":589,"text":507,"children":1074},[1075,1076],{"id":511,"depth":627,"text":512},{"id":572,"depth":627,"text":573},{"id":738,"depth":589,"text":739},{"id":841,"depth":589,"text":842},{"id":888,"depth":589,"text":889},{"id":1038,"depth":589,"text":1039},"Scan a repository of many packages so the report holds the clones you can act on, with --skip-local and --skip-isolated to drop the pairs you accept.","md",null,{},{"icon":53},{"title":1087,"description":1088},"jscpd in a monorepo","How to scan a monorepo with jscpd, drop clones inside one package or between packages of different teams with --skip-local and --skip-isolated, and gate each package in CI.","fHoEugAcOTV_pqrU2c5PgXr4y7iPVEdUbqbIkJ5o-Ac",[1091,1093],{"title":45,"path":46,"stem":47,"description":1092,"icon":48,"children":-1},"Record the clones a codebase already has in a baseline file or take them from a git ref, and fail the build only when a change adds a clone.",{"title":55,"path":56,"stem":57,"description":1094,"icon":58,"children":-1},"Find clones between JavaScript and TypeScript files with --cross-formats, and inside Vue, Svelte, Astro and Markdown files, whose blocks are scanned under their own formats.",1791302986538]