jscpd supports multiple reporters to output duplication detection results in various formats.
| 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 |
jscpd --reporters console,html,json ./src
Specify where reports are saved:
jscpd --output ./reports ./src
In .jscpd.json:
{
"reporters": ["html", "console", "json"],
"output": "./jscpd-report"
}