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