[{"data":1,"prerenderedAt":545},["ShallowReactive",2],{"navigation_docs":3,"-reporters-openmetrics":146,"-reporters-openmetrics-surround":540},[4,50,67,103,125,141],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35,40,45],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"icon":39},"Changelog","\u002Fgetting-started\u002Fchangelog","1.getting-started\u002F7.changelog","i-lucide-scroll-text",{"title":41,"path":42,"stem":43,"icon":44},"Migrating from v4 to v5","\u002Fgetting-started\u002Fmigration","1.getting-started\u002F8.migration","i-lucide-arrow-right-left",{"title":46,"path":47,"stem":48,"icon":49},"jscpd v4 (TypeScript)","\u002Fgetting-started\u002Fv4","1.getting-started\u002F9.v4","i-simple-icons-typescript",{"title":51,"path":52,"stem":53,"children":54,"icon":6},"CI & Hooks","\u002Fci-and-hooks","2.ci-and-hooks\u002F1.index",[55,57,62],{"title":51,"path":52,"stem":53,"icon":56},"i-lucide-git-pull-request",{"title":58,"path":59,"stem":60,"icon":61},"Use jscpd in CI","\u002Fci-and-hooks\u002Fci","2.ci-and-hooks\u002F2.ci","i-lucide-github",{"title":63,"path":64,"stem":65,"icon":66},"Use jscpd in Pre-Commit Hook","\u002Fci-and-hooks\u002Fpre-commit","2.ci-and-hooks\u002F3.pre-commit","i-lucide-git-commit",{"title":68,"path":69,"stem":70,"children":71,"icon":73},"Reporters","\u002Freporters","3.reporters\u002F1.index",[72,74,78,83,88,93,98],{"title":68,"path":69,"stem":70,"icon":73},"i-lucide-file-chart-column",{"title":75,"path":76,"stem":77,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","3.reporters\u002F2.html",{"title":79,"path":80,"stem":81,"icon":82},"JSON Reporter","\u002Freporters\u002Fjson","3.reporters\u002F3.json","i-lucide-braces",{"title":84,"path":85,"stem":86,"icon":87},"Badge Reporter","\u002Freporters\u002Fbadge","3.reporters\u002F4.badge","i-lucide-award",{"title":89,"path":90,"stem":91,"icon":92},"SARIF Reporter","\u002Freporters\u002Fsarif","3.reporters\u002F5.sarif","i-lucide-shield-check",{"title":94,"path":95,"stem":96,"icon":97},"CodeClimate \u002F GitLab Reporter","\u002Freporters\u002Fcodeclimate","3.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":99,"path":100,"stem":101,"icon":102},"OpenMetrics Reporter","\u002Freporters\u002Fopenmetrics","3.reporters\u002F7.openmetrics","i-lucide-activity",{"title":104,"path":105,"stem":106,"children":107,"icon":6},"Benchmarks","\u002Fbenchmarks","4.benchmarks\u002F1.index",[108,110,115,120],{"title":104,"path":105,"stem":106,"icon":109},"i-lucide-gauge",{"title":111,"path":112,"stem":113,"icon":114},"Detection Speed","\u002Fbenchmarks\u002Fdetection-speed","4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":116,"path":117,"stem":118,"icon":119},"Multi-Format Detection","\u002Fbenchmarks\u002Fcross-format","4.benchmarks\u002F3.cross-format","i-lucide-layers",{"title":121,"path":122,"stem":123,"icon":124},"AI Token Efficiency","\u002Fbenchmarks\u002Fai-token-efficiency","4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":126,"path":127,"stem":128,"children":129,"icon":131},"API","\u002Fapi","5.api\u002F1.index",[130,132,137],{"title":126,"path":127,"stem":128,"icon":131},"i-lucide-code",{"title":133,"path":134,"stem":135,"icon":136},"Rust Crates (v5)","\u002Fapi\u002Fcore","5.api\u002F2.core","i-lucide-box",{"title":138,"path":139,"stem":140,"icon":136},"MCP Server","\u002Fapi\u002Fmcp-server","5.api\u002F4.mcp-server",{"title":142,"path":143,"stem":144,"icon":145},"Trending","\u002Ftrending","6.trending","i-lucide-trending-up",{"id":147,"title":99,"body":148,"description":532,"extension":533,"links":534,"meta":535,"navigation":536,"path":100,"seo":537,"stem":101,"__hash__":539},"docs\u002F3.reporters\u002F7.openmetrics.md",{"type":149,"value":150,"toc":525},"minimark",[151,155,159,163,192,198,209,213,220,361,367,375,379,388,450,453,456,521],[152,153,16],"h2",{"id":154},"installation",[156,157,158],"p",{},"The OpenMetrics reporter is included in jscpd v5 by default — no separate installation needed.",[152,160,162],{"id":161},"usage","Usage",[164,165,170],"pre",{"className":166,"code":167,"language":168,"meta":169,"style":169},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd --reporters openmetrics .\u002Fsrc\n","bash","",[171,172,173],"code",{"__ignoreMap":169},[174,175,178,182,186,189],"span",{"class":176,"line":177},"line",1,[174,179,181],{"class":180},"sBMFI","jscpd",[174,183,185],{"class":184},"sfazB"," --reporters",[174,187,188],{"class":184}," openmetrics",[174,190,191],{"class":184}," .\u002Fsrc\n",[156,193,194,195],{},"Output file: ",[171,196,197],{},".\u002Freport\u002Fjscpd-metrics.txt",[156,199,200,201,208],{},"The file follows the ",[202,203,207],"a",{"href":204,"rel":205},"https:\u002F\u002Fopenmetrics.io\u002F",[206],"nofollow","OpenMetrics"," text exposition format (a superset of the Prometheus text format), so it can be consumed by GitLab CI metrics reports, Prometheus tooling, or any OpenMetrics-compatible parser.",[152,210,212],{"id":211},"exposed-metrics","Exposed Metrics",[156,214,215,216,219],{},"Each metric is a gauge with an unlabeled sample for the project total, plus one ",[171,217,218],{},"format=\"...\""," labeled sample per detected format:",[221,222,223,236],"table",{},[224,225,226],"thead",{},[227,228,229,233],"tr",{},[230,231,232],"th",{},"Metric",[230,234,235],{},"Description",[237,238,239,250,260,270,280,290,300,319,331,341,351],"tbody",{},[227,240,241,247],{},[242,243,244],"td",{},[171,245,246],{},"jscpd_source_files",[242,248,249],{},"Number of source files analyzed",[227,251,252,257],{},[242,253,254],{},[171,255,256],{},"jscpd_lines_analyzed",[242,258,259],{},"Total number of lines analyzed",[227,261,262,267],{},[242,263,264],{},[171,265,266],{},"jscpd_tokens_analyzed",[242,268,269],{},"Total number of tokens analyzed",[227,271,272,277],{},[242,273,274],{},[171,275,276],{},"jscpd_clones_found",[242,278,279],{},"Number of duplicated code blocks found",[227,281,282,287],{},[242,283,284],{},[171,285,286],{},"jscpd_duplicated_lines",[242,288,289],{},"Number of duplicated lines",[227,291,292,297],{},[242,293,294],{},[171,295,296],{},"jscpd_duplicated_tokens",[242,298,299],{},"Number of duplicated tokens",[227,301,302,307],{},[242,303,304],{},[171,305,306],{},"jscpd_new_clones",[242,308,309,310,314,315,318],{},"Number of duplicated code blocks absent from the configured ",[202,311,313],{"href":312},"\u002Fgetting-started\u002Fconfiguration#gate-on-new-duplication-only","baseline"," (0 without ",[171,316,317],{},"--baseline",")",[227,320,321,326],{},[242,322,323],{},[171,324,325],{},"jscpd_new_duplicated_lines",[242,327,328,329,318],{},"Number of duplicated lines in clones absent from the configured baseline (0 without ",[171,330,317],{},[227,332,333,338],{},[242,334,335],{},[171,336,337],{},"jscpd_duplicated_lines_percent",[242,339,340],{},"Percentage of duplicated lines",[227,342,343,348],{},[242,344,345],{},[171,346,347],{},"jscpd_duplicated_tokens_percent",[242,349,350],{},"Percentage of duplicated tokens",[227,352,353,358],{},[242,354,355],{},[171,356,357],{},"jscpd_detection_duration_seconds",[242,359,360],{},"Time spent detecting duplicates (total only)",[156,362,363],{},[364,365,366],"strong",{},"Example output:",[164,368,373],{"className":369,"code":371,"language":372},[370],"language-text","# HELP jscpd_duplicated_lines Number of duplicated lines.\n# TYPE jscpd_duplicated_lines gauge\njscpd_duplicated_lines 132\njscpd_duplicated_lines{format=\"javascript\"} 120\njscpd_duplicated_lines{format=\"css\"} 12\n# HELP jscpd_duplicated_lines_percent Percentage of duplicated lines.\n# TYPE jscpd_duplicated_lines_percent gauge\n# UNIT jscpd_duplicated_lines_percent percent\njscpd_duplicated_lines_percent 8.63\n# EOF\n","text",[171,374,371],{"__ignoreMap":169},[152,376,378],{"id":377},"gitlab-ci-metrics-integration","GitLab CI Metrics Integration",[156,380,381,382,387],{},"Declare the output file as a ",[202,383,386],{"href":384,"rel":385},"https:\u002F\u002Fdocs.gitlab.com\u002Fee\u002Fci\u002Ftesting\u002Fmetrics_reports.html",[206],"metrics report artifact"," and GitLab shows metric changes directly in merge requests:",[164,389,394],{"className":390,"code":391,"filename":392,"language":393,"meta":169,"style":169},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd:\n  script:\n    - jscpd --reporters openmetrics --output .\u002Freports .\n  artifacts:\n    reports:\n      metrics: reports\u002Fjscpd-metrics.txt\n",".gitlab-ci.yml","yaml",[171,395,396,405,413,422,430,438],{"__ignoreMap":169},[174,397,398,401],{"class":176,"line":177},[174,399,181],{"class":400},"swJcz",[174,402,404],{"class":403},"sMK4o",":\n",[174,406,408,411],{"class":176,"line":407},2,[174,409,410],{"class":400},"  script",[174,412,404],{"class":403},[174,414,416,419],{"class":176,"line":415},3,[174,417,418],{"class":403},"    -",[174,420,421],{"class":184}," jscpd --reporters openmetrics --output .\u002Freports .\n",[174,423,425,428],{"class":176,"line":424},4,[174,426,427],{"class":400},"  artifacts",[174,429,404],{"class":403},[174,431,433,436],{"class":176,"line":432},5,[174,434,435],{"class":400},"    reports",[174,437,404],{"class":403},[174,439,441,444,447],{"class":176,"line":440},6,[174,442,443],{"class":400},"      metrics",[174,445,446],{"class":403},":",[174,448,449],{"class":184}," reports\u002Fjscpd-metrics.txt\n",[156,451,452],{},"Merge requests then display how each metric (duplicated lines, duplication percentage, …) changed compared to the target branch.",[152,454,21],{"id":455},"configuration",[164,457,462],{"className":458,"code":459,"filename":460,"language":461,"meta":169,"style":169},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"reporters\": [\"openmetrics\"],\n  \"output\": \".\u002Freports\"\n}\n",".jscpd.json","json",[171,463,464,469,496,516],{"__ignoreMap":169},[174,465,466],{"class":176,"line":177},[174,467,468],{"class":403},"{\n",[174,470,471,474,478,481,483,486,488,491,493],{"class":176,"line":407},[174,472,473],{"class":403},"  \"",[174,475,477],{"class":476},"spNyl","reporters",[174,479,480],{"class":403},"\"",[174,482,446],{"class":403},[174,484,485],{"class":403}," [",[174,487,480],{"class":403},[174,489,490],{"class":184},"openmetrics",[174,492,480],{"class":403},[174,494,495],{"class":403},"],\n",[174,497,498,500,503,505,507,510,513],{"class":176,"line":415},[174,499,473],{"class":403},[174,501,502],{"class":476},"output",[174,504,480],{"class":403},[174,506,446],{"class":403},[174,508,509],{"class":403}," \"",[174,511,512],{"class":184},".\u002Freports",[174,514,515],{"class":403},"\"\n",[174,517,518],{"class":176,"line":424},[174,519,520],{"class":403},"}\n",[522,523,524],"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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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}",{"title":169,"searchDepth":407,"depth":407,"links":526},[527,528,529,530,531],{"id":154,"depth":407,"text":16},{"id":161,"depth":407,"text":162},{"id":211,"depth":407,"text":212},{"id":377,"depth":407,"text":378},{"id":455,"depth":407,"text":21},"Generate OpenMetrics reports for GitLab CI metrics integration.","md",null,{},{"icon":102},{"title":99,"description":538},"Generate duplication metrics in OpenMetrics format for GitLab CI metrics reports.","81PPcUt9iNJV-3Q6etUYNCikaw2ZWQ2gjRMjSpztaDg",[541,543],{"title":94,"path":95,"stem":96,"description":542,"icon":97,"children":-1},"Generate GitLab Code Quality reports in the CodeClimate issue format.",{"title":104,"path":105,"stem":106,"description":544,"icon":109,"children":-1},"How jscpd v5 compares to other copy\u002Fpaste detectors — speed, format coverage, and token efficiency.",1788342646059]