Reporters
Reporters
Output formats and reporters in jscpd.
Overview
jscpd supports multiple reporters to output duplication detection results in various formats.
Available Reporters
| Reporter | Description |
|---|---|
console | Output results to console (default) |
consoleFull | Detailed console output with code snippets |
json | JSON format output |
xml | XML format output |
html | Interactive HTML report |
markdown | Markdown format output |
csv | CSV format output |
threshold | Exit with error if threshold exceeded |
badge | Generate 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"
}