Output Formats
Format Overview
Section titled “Format Overview”| Format | Flag | Use case |
|---|---|---|
| Text | (default) | Quick terminal review |
| Rich text | --rich-text |
Priority badges and refactoring suggestions |
| HTML | --html |
Detailed report with syntax highlighting and diffs |
| JSON | --json / -j |
CI/CD integration with metadata and summary |
| Simple JSON | --simple-json |
Lightweight JSON with impact scores |
| SARIF | --sarif |
GitHub Advanced Security / CodeQL integration |
| Plumbing | --plumbing / -p |
Machine-readable file:startLine-endLine for scripts |
Text (Default)
Section titled “Text (Default)”art-duplHuman-readable clone listing with file paths, line numbers, and diff hints.
Rich Text
Section titled “Rich Text”art-dupl --rich-textEnhanced text output with:
- Priority badges (critical, high, medium, low)
- Clone type labels (Type 1 / 2 / 3)
- Actionability verdicts
- Refactoring suggestions
art-dupl --html > report.htmlart-dupl --html --diff side-by-side > report.htmlart-dupl --html --diff inline > report.htmlDark-themed HTML report with:
- Syntax highlighting
- Side-by-side or inline diff visualization (LCS algorithm)
- VSCode links for direct navigation
- Clone group summaries
art-dupl --json -t 10Structured JSON with version, timestamp, clone_groups array, and summary statistics. Includes:
- Clone type classification
- Extractability scores (
lines_saved,extractable) - Actionability verdicts
- Token counts and severity
Simple JSON
Section titled “Simple JSON”art-dupl --simple-jsonLightweight JSON format with score (impact) and instances with token_count. Easier to consume for simple integrations.
art-dupl --sarif > results.sarifSARIF 2.1.0 format for GitHub Advanced Security. Upload via:
- uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarifClones appear as results in the GitHub Security tab.
Plumbing
Section titled “Plumbing”art-dupl --plumbingMachine-readable format: file:startLine-endLine. Ideal for scripts, editor integrations, and piping to other tools.
# Count duplicate filesart-dupl --plumbing | cut -d: -f1 | sort -u | wc -lAll Formats
Section titled “All Formats”art-dupl --all --output-dir ./reportsGenerate all output formats to a directory at once.
Sorting
Section titled “Sorting”Control sort order with -s / --sort:
| Option | Description |
|---|---|
size (default) |
Largest clone groups first |
occurrence |
Most widespread (most files) first |
hash |
Alphabetical by hash value |
total-tokens |
Highest total token count first |