@@ -27,7 +27,7 @@ all with baseline-aware governance that separates **known** technical debt from
2727- ** Quality metrics** — cyclomatic complexity, coupling (CBO), cohesion (LCOM4), dependency cycles, dead code, health
2828 score
2929- ** Baseline governance** — known debt stays accepted; CI blocks only new clones and metric regressions
30- - ** Reports** — interactive HTML, deterministic JSON (schema v2.0), plain text — all with NEW/KNOWN split
30+ - ** Reports** — interactive HTML, deterministic JSON/TXT plus Markdown and SARIF projections from one canonical report
3131- ** CI-first** — deterministic output, stable ordering, exit code contract, pre-commit support
3232- ** Fast** — incremental caching, parallel processing, warm-run optimization
3333
@@ -38,6 +38,7 @@ pip install codeclone # or: uv tool install codeclone
3838
3939codeclone . # analyze current directory
4040codeclone . --html # generate HTML report
41+ codeclone . --json --md --sarif --text # generate machine-readable reports
4142codeclone . --ci # CI mode (--fail-on-new --no-color --quiet)
4243```
4344
@@ -103,6 +104,9 @@ skip_metrics = false
103104quiet = true
104105html_out = ".cache/codeclone/report.html"
105106json_out = ".cache/codeclone/report.json"
107+ md_out = ".cache/codeclone/report.md"
108+ sarif_out = ".cache/codeclone/report.sarif"
109+ text_out = ".cache/codeclone/report.txt"
106110` ` `
107111
108112Precedence : CLI flags > `pyproject.toml` > built-in defaults.
@@ -135,54 +139,48 @@ Contract errors (`2`) take precedence over gating failures (`3`).
135139|--------|----------|--------------------------------|
136140| HTML | `--html` | `.cache/codeclone/report.html` |
137141| JSON | `--json` | `.cache/codeclone/report.json` |
142+ | Markdown | `--md` | `.cache/codeclone/report.md` |
143+ | SARIF | `--sarif` | `.cache/codeclone/report.sarif` |
138144| Text | `--text` | `.cache/codeclone/report.txt` |
139145
140- All reports include NEW/KNOWN split, matched code snippets, and provenance metadata .
146+ All report formats are rendered from one canonical JSON report document .
141147
142148<details>
143- <summary>JSON report shape (v2.0 )</summary>
149+ <summary>JSON report shape (v2.1 )</summary>
144150
145151` ` ` json
146152{
147- "report_schema_version": "2.0 ",
153+ "report_schema_version": "2.1 ",
148154 "meta": {
155+ "codeclone_version": "2.0.0b1",
149156 "project_name": "...",
150- "scan_root": "..."
157+ "scan_root": "...",
158+ "report_mode": "full",
159+ "baseline": { "...": "..." },
160+ "cache": { "...": "..." },
161+ "metrics_baseline": { "...": "..." },
162+ "runtime": { "report_generated_at_utc": "..." }
151163 },
152- "files": [],
153- "groups": {
154- "functions": {},
155- "blocks": {},
156- "segments": {}
164+ "inventory": {
165+ "files": { "...": "..." },
166+ "code": { "...": "..." },
167+ "file_registry": { "encoding": "relative_path", "items": [] }
157168 },
158- "groups_split": {
159- "functions": {
160- "new": [],
161- "known": []
162- },
163- "blocks": {
164- "new": [],
165- "known": []
166- },
167- "segments": {
168- "new": [],
169- "known": []
169+ "findings": {
170+ "summary": { "...": "..." },
171+ "groups": {
172+ "clones": { "functions": [], "blocks": [], "segments": [] },
173+ "structural": { "groups": [] },
174+ "dead_code": { "groups": [] },
175+ "design": { "groups": [] }
170176 }
171177 },
172- "group_item_layout": {
173- "functions": [
174- "..."
175- ],
176- "blocks": [
177- "..."
178- ],
179- "segments": [
180- "..."
181- ]
182- },
183- "facts": {},
184- "metrics": {},
185- "suggestions": []
178+ "metrics": { "summary": {}, "families": {} },
179+ "derived": { "suggestions": [], "overview": {}, "hotlists": {} },
180+ "integrity": {
181+ "canonicalization": { "version": "1", "scope": "canonical_only" },
182+ "digest": { "algorithm": "sha256", "verified": true, "value": "..." }
183+ }
186184}
187185` ` `
188186
0 commit comments