Reporters

Reporters

Output formats and reporters in jscpd.

Overview

jscpd supports multiple reporters to output duplication detection results in various formats.

Available Reporters

ReporterDescription
consoleOutput results to console (default)
consoleFullDetailed console output with code snippets
jsonJSON format output
xmlXML format output
htmlInteractive HTML report
markdownMarkdown format output
csvCSV format output
thresholdExit with error if threshold exceeded
badgeGenerate SVG badge

Using Multiple Reporters

jscpd --reporters console,html,json ./src

Output Directory

Specify where reports are saved:

jscpd --output ./reports ./src

Reporter Configuration

In .jscpd.json:

.jscpd.json
{
  "reporters": ["html", "console", "json"],
  "output": "./jscpd-report"
}