[{"data":1,"prerenderedAt":1353},["ShallowReactive",2],{"navigation_docs":3,"-reference-reporters":249,"-reference-reporters-surround":1344,"page-views-\u002Freference\u002Freporters":1349},[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":145,"body":251,"description":1337,"extension":1338,"links":1339,"meta":1340,"navigation":1341,"path":146,"seo":1342,"stem":147,"__hash__":1343},"docs\u002F4.reference\u002F4.reporters\u002Findex.md",{"type":252,"value":253,"toc":1328},"minimark",[254,279,284,565,575,579,614,617,625,631,716,720,734,763,769,784,796,820,826,840,848,854,860,864,876,1077,1083,1086,1119,1123,1126,1265,1269,1324],[255,256,257,258,262,263,266,267,270,271,274,275,278],"p",{},"Every reporter ships inside the jscpd binary, so there is nothing to install. ",[259,260,261],"code",{},"-r"," (",[259,264,265],{},"--reporters",") takes a comma-separated list, ",[259,268,269],{},"console"," is the default, and the reporters that write files put them in ",[259,272,273],{},"--output",", which is ",[259,276,277],{},".\u002Freport\u002F"," unless you change it. The console reporters print to stdout, so one run can print to the terminal and write any number of files.",[280,281,283],"h2",{"id":282},"the-reporters","The reporters",[285,286,287,303],"table",{},[288,289,290],"thead",{},[291,292,293,297,300],"tr",{},[294,295,296],"th",{},"Reporter",[294,298,299],{},"Writes",[294,301,302],{},"Pick it when",[304,305,306,319,344,358,374,386,403,418,433,448,463,478,496,511,530,545],"tbody",{},[291,307,308,313,316],{},[309,310,311],"td",{},[259,312,269],{},[309,314,315],{},"the terminal",[309,317,318],{},"you read the result where you ran it: the clones, then a table per format (the default)",[291,320,321,335,337],{},[309,322,323,326,327,330,331,334],{},[259,324,325],{},"console-full"," (aliases ",[259,328,329],{},"consoleFull",", ",[259,332,333],{},"full",")",[309,336,315],{},[309,338,339,340,343],{},"you want the code of both copies under each clone; with ",[259,341,342],{},"--blame"," each line carries its author on both sides",[291,345,346,351,353],{},[309,347,348],{},[259,349,350],{},"ai",[309,352,315],{},[309,354,355,356],{},"an agent or an LLM reads the output: one line per clone and no code, about 79% fewer tokens than ",[259,357,269],{},[291,359,360,365,367],{},[309,361,362],{},[259,363,364],{},"xcode",[309,366,315],{},[309,368,369,370,373],{},"a build log parser such as Xcode's turns ",[259,371,372],{},"path:line:column: warning:"," lines into warnings",[291,375,376,381,383],{},[309,377,378],{},[259,379,380],{},"silent",[309,382,315],{},[309,384,385],{},"you only want the one-line summary and the exit code",[291,387,388,393,396],{},[309,389,390],{},[259,391,392],{},"threshold",[309,394,395],{},"nothing",[309,397,398,399,402],{},"a v4 config lists it; ",[259,400,401],{},"--threshold"," runs the same check on its own",[291,404,405,410,415],{},[309,406,407],{},[259,408,409],{},"json",[309,411,412],{},[259,413,414],{},"jscpd-report.json",[309,416,417],{},"a script reads the clones and the statistics",[291,419,420,425,430],{},[309,421,422],{},[259,423,424],{},"xml",[309,426,427],{},[259,428,429],{},"jscpd-report.xml",[309,431,432],{},"a tool expects the PMD CPD XML format",[291,434,435,440,445],{},[309,436,437],{},[259,438,439],{},"csv",[309,441,442],{},[259,443,444],{},"jscpd-report.csv",[309,446,447],{},"the per-format statistics go into a spreadsheet",[291,449,450,455,460],{},[309,451,452],{},[259,453,454],{},"markdown",[309,456,457],{},[259,458,459],{},"jscpd-report.md",[309,461,462],{},"the statistics table goes into a pull request comment or a wiki page",[291,464,465,470,475],{},[309,466,467],{},[259,468,469],{},"html",[309,471,472],{},[259,473,474],{},"jscpd-report.html",[309,476,477],{},"a person reads the report in a browser",[291,479,480,485,493],{},[309,481,482],{},[259,483,484],{},"badge",[309,486,487,330,490],{},[259,488,489],{},"jscpd-badge.svg",[259,491,492],{},"jscpd-lines-badge.svg",[309,494,495],{},"a README shows the duplication",[291,497,498,503,508],{},[309,499,500],{},[259,501,502],{},"sarif",[309,504,505],{},[259,506,507],{},"jscpd-report.sarif",[309,509,510],{},"GitHub code scanning or another SARIF consumer shows the clones on the diff",[291,512,513,522,527],{},[309,514,515,518,519,334],{},[259,516,517],{},"codeclimate"," (alias ",[259,520,521],{},"gitlab",[309,523,524],{},[259,525,526],{},"gl-code-quality-report.json",[309,528,529],{},"GitLab lists the clones in the Code Quality widget of a merge request (5.1.0+)",[291,531,532,537,542],{},[309,533,534],{},[259,535,536],{},"openmetrics",[309,538,539],{},[259,540,541],{},"jscpd-metrics.txt",[309,543,544],{},"GitLab metrics reports or a Prometheus-style parser track the numbers (5.1.0+)",[291,546,547,552,557],{},[309,548,549],{},[259,550,551],{},"edn",[309,553,554],{},[259,555,556],{},"jscpd-report.edn",[309,558,559,560,564],{},"a Clojure tool or a script reads every pair of ",[561,562,563],"a",{"href":96},"similar functions"," with its score, and the other clones",[255,566,567,568,571,572,574],{},"jscpd 5 has no ",[259,569,570],{},"time"," reporter: the timing line prints on its own, and a ",[259,573,570],{}," entry left over from a v4 config is accepted and ignored.",[280,576,578],{"id":577},"run-it","Run it",[580,581,587],"pre",{"className":582,"code":583,"filename":584,"language":585,"meta":586,"style":586},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd . -r console,json,html --output report\n","Terminal","bash","",[259,588,589],{"__ignoreMap":586},[590,591,594,598,602,605,608,611],"span",{"class":592,"line":593},"line",1,[590,595,597],{"class":596},"sBMFI","jscpd",[590,599,601],{"class":600},"sfazB"," .",[590,603,604],{"class":600}," -r",[590,606,607],{"class":600}," console,json,html",[590,609,610],{"class":600}," --output",[590,612,613],{"class":600}," report\n",[255,615,616],{},"The console part prints first, then one line per file:",[580,618,623],{"className":619,"code":621,"language":622,"meta":586},[620],"language-text","Found 3 clones.\nJSON report saved to report\u002Fjscpd-report.json\nHTML report saved to report\u002Fjscpd-report.html\ntime: 4.566ms\n","text",[259,624,621],{"__ignoreMap":586},[255,626,627,630],{},[259,628,629],{},"--no-colors"," drops the ANSI colors from the console reporters, which keeps a CI log readable. The same reporters in the config file:",[580,632,636],{"className":633,"code":634,"filename":635,"language":409,"meta":586,"style":586},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"reporters\": [\"console\", \"json\", \"html\"],\n  \"output\": \"report\"\n}\n",".jscpd.json",[259,637,638,644,690,710],{"__ignoreMap":586},[590,639,640],{"class":592,"line":593},[590,641,643],{"class":642},"sMK4o","{\n",[590,645,647,650,654,657,660,663,665,667,669,672,675,677,679,681,683,685,687],{"class":592,"line":646},2,[590,648,649],{"class":642},"  \"",[590,651,653],{"class":652},"spNyl","reporters",[590,655,656],{"class":642},"\"",[590,658,659],{"class":642},":",[590,661,662],{"class":642}," [",[590,664,656],{"class":642},[590,666,269],{"class":600},[590,668,656],{"class":642},[590,670,671],{"class":642},",",[590,673,674],{"class":642}," \"",[590,676,409],{"class":600},[590,678,656],{"class":642},[590,680,671],{"class":642},[590,682,674],{"class":642},[590,684,469],{"class":600},[590,686,656],{"class":642},[590,688,689],{"class":642},"],\n",[590,691,693,695,698,700,702,704,707],{"class":592,"line":692},3,[590,694,649],{"class":642},[590,696,697],{"class":652},"output",[590,699,656],{"class":642},[590,701,659],{"class":642},[590,703,674],{"class":642},[590,705,706],{"class":600},"report",[590,708,709],{"class":642},"\"\n",[590,711,713],{"class":592,"line":712},4,[590,714,715],{"class":642},"}\n",[280,717,719],{"id":718},"what-the-terminal-shows","What the terminal shows",[255,721,722,723,725,726,729,730,733],{},"The ",[259,724,269],{}," reporter prints one header per clone, the two locations as ",[259,727,728],{},"[line:column - line:column]",", and a table per format. The header names the format and, when the clone is not an exact copy, its kind. On the ",[259,731,732],{},"fixtures\u002Fmcp-demo"," folder of the repository, with the flags that find renamed and near-miss clones:",[580,735,737],{"className":582,"code":736,"filename":584,"language":585,"meta":586,"style":586},"jscpd . --ignore-identifiers --ignore-literals --max-gap-lines 1 -r console\n",[259,738,739],{"__ignoreMap":586},[590,740,741,743,745,748,751,754,758,760],{"class":592,"line":593},[590,742,597],{"class":596},[590,744,601],{"class":600},[590,746,747],{"class":600}," --ignore-identifiers",[590,749,750],{"class":600}," --ignore-literals",[590,752,753],{"class":600}," --max-gap-lines",[590,755,757],{"class":756},"sbssI"," 1",[590,759,604],{"class":600},[590,761,762],{"class":600}," console\n",[580,764,767],{"className":765,"code":766,"language":622,"meta":586},[620],"Clone found (javascript, similar (gap) ~0.95)\n - src\u002Finvoice.js [1:1 - 12:2] (12 lines, 197 tokens)\n   src\u002Fprint\u002Finvoice.js [1:1 - 13:2]\nClone found (javascript)\n - src\u002Forders.js [1:1 - 12:2] (12 lines, 124 tokens)\n   src\u002Freports\u002Forders.js [1:1 - 12:2]\nClone found (javascript, renamed)\n - src\u002Freturns.js [1:1 - 10:2] (10 lines, 104 tokens)\n   src\u002Fshipping.js [1:1 - 10:2]\nFound 3 clones.\ntime: 6.764ms\n",[259,768,766],{"__ignoreMap":586},[255,770,771,772,330,774,776,777,780,781,783],{},"The table is shortened here: the real one has a row for every format in the scan, including the ones without clones (",[259,773,585],{},[259,775,454],{}," and ",[259,778,779],{},"python"," in this folder). ",[259,782,325],{}," prints the same headers with the source lines of both copies underneath.",[255,785,722,786,788,789,792,793,659],{},[259,787,350],{}," reporter drops the table and the code and factors the common path prefix out of each pair. A renamed clone gets ",[259,790,791],{},"(renamed)",", a near-miss clone its similarity and the mechanism that found it, a semantic clone ",[259,794,795],{},"[~0.78 semantic]",[580,797,799],{"className":582,"code":798,"filename":584,"language":585,"meta":586,"style":586},"jscpd . --ignore-identifiers --ignore-literals --max-gap-lines 1 -r ai\n",[259,800,801],{"__ignoreMap":586},[590,802,803,805,807,809,811,813,815,817],{"class":592,"line":593},[590,804,597],{"class":596},[590,806,601],{"class":600},[590,808,747],{"class":600},[590,810,750],{"class":600},[590,812,753],{"class":600},[590,814,757],{"class":756},[590,816,604],{"class":600},[590,818,819],{"class":600}," ai\n",[580,821,824],{"className":822,"code":823,"language":622,"meta":586},[620],"Clones:\nsrc\u002F invoice.js:1-12 ~ print\u002Finvoice.js:1-13 [~0.95 gap]\nsrc\u002F orders.js:1-12 ~ reports\u002Forders.js:1-12\nsrc\u002F returns.js:1-10 ~ shipping.js:1-10 (renamed)\n---\n3 clones · 17.7% duplication\n",[259,825,823],{"__ignoreMap":586},[255,827,828,829,832,833,835,836,839],{},"On the repository's ",[259,830,831],{},"fixtures\u002F"," tree (132 files, 91 clones) this came to about 1,100 tokens against about 5,400 for ",[259,834,269],{},". ",[561,837,838],{"href":232},"AI token efficiency"," has a second measurement on the larger benchmark corpus.",[255,841,842,844,845,847],{},[259,843,364],{}," prints one line per clone in the shape build tools parse, and ",[259,846,380],{}," prints the summary line only:",[580,849,852],{"className":850,"code":851,"language":622,"meta":586},[620],"src\u002Finvoice.js:1:0: warning: Found 11 lines (1-12) duplicated on file src\u002Fprint\u002Finvoice.js (1-13)\nsrc\u002Forders.js:1:0: warning: Found 11 lines (1-12) duplicated on file src\u002Freports\u002Forders.js (1-12)\nsrc\u002Freturns.js:1:0: warning: Found 9 lines (1-10) duplicated on file src\u002Fshipping.js (1-10)\nFound 3 clones.\n",[259,853,851],{"__ignoreMap":586},[580,855,858],{"className":856,"code":857,"language":622,"meta":586},[620],"Duplications detection: Found 3 exact clones with 25(13.02%) duplicated lines in 9 (4 formats) files.\n",[259,859,857],{"__ignoreMap":586},[280,861,863],{"id":862},"how-kinds-and-gates-show-up","How kinds and gates show up",[255,865,722,866,869,870,776,873,875],{},[561,867,868],{"href":111},"kind of a clone",", a ",[561,871,872],{"href":46},"baseline",[259,874,401],{}," reach each format differently. The exit code is the same for all of them, and jscpd writes the files before the gates run, so a failing job still has its reports.",[285,877,878,895],{},[288,879,880],{},[291,881,882,884,887,890],{},[294,883,296],{},[294,885,886],{},"Kind of clone",[294,888,889],{},"New against a baseline",[294,891,892,893],{},"Over ",[259,894,401],{},[304,896,897,936,959,992,1012,1034,1053],{},[291,898,899,905,920,929],{},[309,900,901,330,903],{},[259,902,269],{},[259,904,325],{},[309,906,907,908,330,911,330,914,330,917],{},"in the header: ",[259,909,910],{},"renamed",[259,912,913],{},"similar (gap) ~0.95",[259,915,916],{},"similar (ast) ~0.75",[259,918,919],{},"semantic ~0.78",[309,921,922,925,926],{},[259,923,924],{},"[NEW]"," after the header and ",[259,927,928],{},"Found 3 clones (2 new).",[309,930,931,932,935],{},"an ",[259,933,934],{},"ERROR:"," line, exit 1",[291,937,938,942,954,956],{},[309,939,940],{},[259,941,350],{},[309,943,944,330,946,330,949,330,952],{},[259,945,791],{},[259,947,948],{},"[~0.95 gap]",[259,950,951],{},"[~0.75 ast]",[259,953,795],{},[309,955,395],{},[309,957,958],{},"exit 1",[291,960,961,965,976,989],{},[309,962,963],{},[259,964,409],{},[309,966,967,330,970,330,973],{},[259,968,969],{},"kind",[259,971,972],{},"similarity",[259,974,975],{},"method",[309,977,978,981,982,776,985,988],{},[259,979,980],{},"isNew"," per clone, ",[259,983,984],{},"newClones",[259,986,987],{},"newDuplicatedLines"," in the statistics",[309,990,991],{},"nothing in the file, exit 1",[291,993,994,998,1001,1007],{},[309,995,996],{},[259,997,502],{},[309,999,1000],{},"the rule id",[309,1002,1003,1004],{},"level ",[259,1005,1006],{},"error",[309,1008,1009,1010],{},"every result at level ",[259,1011,1006],{},[291,1013,1014,1018,1023,1029],{},[309,1015,1016],{},[259,1017,517],{},[309,1019,1020],{},[259,1021,1022],{},"check_name",[309,1024,1025,1026],{},"severity ",[259,1027,1028],{},"major",[309,1030,1031,1032],{},"every issue at ",[259,1033,1028],{},[291,1035,1036,1040,1042,1050],{},[309,1037,1038],{},[259,1039,536],{},[309,1041,395],{},[309,1043,1044,330,1047],{},[259,1045,1046],{},"jscpd_new_clones",[259,1048,1049],{},"jscpd_new_duplicated_lines",[309,1051,1052],{},"nothing in the file",[291,1054,1055,1071,1073,1075],{},[309,1056,1057,330,1059,330,1061,330,1063,330,1065,330,1067,330,1069],{},[259,1058,469],{},[259,1060,424],{},[259,1062,439],{},[259,1064,454],{},[259,1066,484],{},[259,1068,364],{},[259,1070,380],{},[309,1072,395],{},[309,1074,395],{},[309,1076,1052],{},[255,1078,1079,1082],{},[259,1080,1081],{},"--kind"," narrows every reporter to the kinds you name, and the statistics follow the clones that are reported.",[280,1084,100],{"id":1085},"boundaries",[255,1087,1088,1089,1092,1093,776,1095,1097,1098,1101,1102,1104,1105,1108,1109,1111,1112,1118],{},"With ",[561,1090,1091],{"href":101},"boundary rules"," in the config file, ",[259,1094,269],{},[259,1096,325],{}," print a ",[259,1099,1100],{},"Boundaries:"," block after the table, with each copy above the protected code it copies. ",[259,1103,350],{}," prints one ",[259,1106,1107],{},"rule: copy ~ protected"," line per copy and a count, and ",[259,1110,409],{}," adds a ",[561,1113,1115,1117],{"href":1114},"\u002Freference\u002Freporters\u002Fjson#boundaries",[259,1116,1085],{}," key",". The other reporters leave the copies out. A copy fails the run with exit code 1 whichever reporters run.",[280,1120,1122],{"id":1121},"other-modes","Other modes",[255,1124,1125],{},"The modes beside clone detection reuse the reporter names and write files of their own:",[285,1127,1128,1140],{},[288,1129,1130],{},[291,1131,1132,1135,1137],{},[294,1133,1134],{},"Mode",[294,1136,145],{},[294,1138,1139],{},"Files",[304,1141,1142,1174,1209,1245],{},[291,1143,1144,1151,1163],{},[309,1145,1146],{},[561,1147,1148],{"href":86},[259,1149,1150],{},"--compare",[309,1152,1153,330,1155,330,1157,330,1159,330,1161],{},[259,1154,269],{},[259,1156,325],{},[259,1158,409],{},[259,1160,454],{},[259,1162,469],{},[309,1164,1165,330,1168,330,1171],{},[259,1166,1167],{},"jscpd-compare.json",[259,1169,1170],{},"jscpd-compare.md",[259,1172,1173],{},"jscpd-compare.html",[291,1175,1176,1183,1195],{},[309,1177,1178],{},[561,1179,1180],{"href":76},[259,1181,1182],{},"--dashboard",[309,1184,1185,330,1187,330,1189,330,1191,330,1193],{},[259,1186,269],{},[259,1188,409],{},[259,1190,484],{},[259,1192,454],{},[259,1194,469],{},[309,1196,1197,330,1200,330,1203,330,1206],{},[259,1198,1199],{},"jscpd-dashboard.json",[259,1201,1202],{},"jscpd-dashboard.md",[259,1204,1205],{},"jscpd-dashboard.html",[259,1207,1208],{},"jscpd-health-badge.svg",[291,1210,1211,1218,1232],{},[309,1212,1213],{},[561,1214,1215],{"href":121},[259,1216,1217],{},"--health",[309,1219,1220,330,1222,330,1224,330,1226,330,1228,330,1230],{},[259,1221,269],{},[259,1223,350],{},[259,1225,409],{},[259,1227,484],{},[259,1229,454],{},[259,1231,469],{},[309,1233,1234,330,1237,330,1240,330,1243],{},[259,1235,1236],{},"jscpd-health.json",[259,1238,1239],{},"jscpd-health.md",[259,1241,1242],{},"jscpd-health.html",[259,1244,1208],{},[291,1246,1247,1252,1260],{},[309,1248,1249],{},[259,1250,1251],{},"--complexity",[309,1253,1254,330,1256,330,1258],{},[259,1255,269],{},[259,1257,350],{},[259,1259,409],{},[309,1261,1262],{},[259,1263,1264],{},"jscpd-complexity.json",[280,1266,1268],{"id":1267},"related","Related",[1270,1271,1272,1293,1304,1318],"ul",{},[1273,1274,1275,330,1278,330,1281,330,1283,330,1286,776,1289,1292],"li",{},[561,1276,1277],{"href":153},"HTML",[561,1279,1280],{"href":158},"JSON",[561,1282,484],{"href":163},[561,1284,1285],{"href":168},"SARIF",[561,1287,1288],{"href":173},"CodeClimate",[561,1290,1291],{"href":178},"OpenMetrics"," have a page each.",[1273,1294,1295,1297,1298,330,1300,1303],{},[561,1296,130],{"href":131}," for ",[259,1299,261],{},[259,1301,1302],{},"-o"," and every flag a reporter reads.",[1273,1305,1306,1308,1309,330,1311,776,1314,1317],{},[561,1307,140],{"href":141}," for what ",[259,1310,401],{},[259,1312,1313],{},"--exit-code",[259,1315,1316],{},"--fail-on-new-clones"," do to a run.",[1273,1319,1320,1323],{},[561,1321,1322],{"href":36},"CI"," for the workflows that collect these files.",[1325,1326,1327],"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 .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}",{"title":586,"searchDepth":646,"depth":646,"links":1329},[1330,1331,1332,1333,1334,1335,1336],{"id":282,"depth":646,"text":283},{"id":577,"depth":646,"text":578},{"id":718,"depth":646,"text":719},{"id":862,"depth":646,"text":863},{"id":1085,"depth":646,"text":100},{"id":1121,"depth":646,"text":1122},{"id":1267,"depth":646,"text":1268},"The 16 reporters of jscpd, what each one writes, and which to pick for a terminal, a script, a merge request widget or a README.","md",null,{},{"icon":150},{"title":145,"description":1337},"rx0J1bwSirnzAUKXhRxejR69kD6O6Rr6tiUTxKBnTzM",[1345,1347],{"title":140,"path":141,"stem":142,"description":1346,"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.",{"title":152,"path":153,"stem":154,"description":1348,"icon":155,"children":-1},"One self-contained page with the statistics per format and the code of every clone, for reading a report in a browser.",{"\u002Freference\u002Freporters":1350},{"views":1351,"visits":1352},59,30,1795510268234]