Skip to content

Commit b2fd74f

Browse files
committed
chore(docs): update docs
1 parent facbc29 commit b2fd74f

3 files changed

Lines changed: 37 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
This release improves clone-detection precision and explainability with deterministic
88
normalization and CFG upgrades, adds segment-level internal clone reporting, refreshes
9-
the HTML report UI, and introduces baseline versioning. This is a breaking change for CI
10-
workflows that rely on existing baselines.
9+
the HTML report UI, and introduces baseline versioning. It is a breaking CI change for
10+
workflows that reuse old baselines.
1111

1212
### Clone Detection Accuracy
1313

@@ -26,7 +26,7 @@ workflows that rely on existing baselines.
2626

2727
- **Exception linking**
2828
Linked `try/except` only to statements that may raise (calls, attribute access, indexing,
29-
`await`, `yield from`, `raise`) instead of blanket connections.
29+
`await`, `yield from`, `raise`) instead of blanket links.
3030

3131
### Segment‑Level Detection
3232

@@ -35,10 +35,10 @@ workflows that rely on existing baselines.
3535

3636
- **Candidate generation**
3737
Used an order‑insensitive signature for candidate grouping and a strict segment hash for
38-
final confirmation; segment matches do not affect baseline or CI failure logic.
38+
final confirmation. Segment matches do not affect baseline or CI failure logic.
3939
- **Noise reduction (report‑only)**
4040
Merged overlapping segment windows into a single span per function and suppressed
41-
boilerplateonly groups (attribute assignment wiring) using deterministic AST criteria.
41+
boilerplate-only groups (attribute assignment wiring) with deterministic AST criteria.
4242

4343
### Baseline & CI
4444

@@ -59,25 +59,23 @@ codeclone . --update-baseline
5959
- Added `--cache-path` (legacy alias: `--cache-dir`) and clarified cache help text.
6060
- Added `--ci` preset (`--fail-on-new --no-color --quiet`).
6161
- Improved `--fail-on-new` output with aggregated counts and clear next steps.
62-
- Validate report output extensions (`.html`, `.json`, `.txt`) and fail fast on mismatches.
62+
- Added strict report output extension validation (`.html`, `.json`, `.txt`).
6363

6464
### HTML Report UI
6565

6666
- **Visual refresh**
67-
Introduced a redesigned, modern HTML report layout with a sticky top bar and improved
68-
typography and spacing.
67+
Introduced a modernized HTML report layout with a sticky top bar and improved spacing.
6968

7069
- **Interactive tooling**
71-
Added a command palette, keyboard shortcuts, toast notifications, and quick actions for
72-
common tasks (export, stats, charts, navigation).
70+
Added a command palette, keyboard shortcuts, toast notifications, and quick actions
71+
(export, stats, charts, navigation).
7372

7473
- **Reporting widgets**
75-
Added a stats dashboard and chart container to surface high‑level clone metrics directly
76-
in the report.
74+
Added a stats dashboard and chart container for high-level clone metrics.
7775

7876
- **Icon system**
7977
Replaced emoji glyphs with inline SVG icons for consistent rendering and a fully
80-
selfcontained UI.
78+
self-contained UI.
8179

8280
- **Segment reporting**
8381
Added a dedicated “Segment clones” section and summary metric in HTML/TXT/JSON outputs.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,30 @@ See full design and semantics:
278278
279279
---
280280
281+
## CLI Options
282+
283+
| Option | Description | Default |
284+
|-------------------------------|------------------------------------------------------------------|--------------------------------------|
285+
| `root` | Project root directory to scan | `.` |
286+
| `--version` | Print CodeClone version and exit | - |
287+
| `--min-loc` | Minimum function LOC to analyze | `15` |
288+
| `--min-stmt` | Minimum AST statements to analyze | `6` |
289+
| `--processes` | Number of worker processes | `4` |
290+
| `--cache-path FILE` | Cache file path | `<root>/.cache/codeclone/cache.json` |
291+
| `--cache-dir FILE` | Legacy alias for `--cache-path` | - |
292+
| `--baseline FILE` | Baseline file path | `codeclone.baseline.json` |
293+
| `--update-baseline` | Regenerate baseline from current results | `False` |
294+
| `--fail-on-new` | Fail if new function/block clone groups appear vs baseline | `False` |
295+
| `--fail-threshold MAX_CLONES` | Fail if total clone groups (`function + block`) exceed threshold | `-1` (disabled) |
296+
| `--ci` | CI preset: `--fail-on-new --no-color --quiet` | `False` |
297+
| `--html FILE` | Write HTML report (`.html`) | - |
298+
| `--json FILE` | Write JSON report (`.json`) | - |
299+
| `--text FILE` | Write text report (`.txt`) | - |
300+
| `--no-progress` | Disable progress bar output | `False` |
301+
| `--no-color` | Disable ANSI colors | `False` |
302+
| `--quiet` | Minimize output (warnings/errors still shown) | `False` |
303+
| `--verbose` | Show hash details for new clone groups in fail output | `False` |
304+
281305
## License
282306

283307
MIT License

docs/architecture.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ CodeClone processes Python projects in the following stages:
2323

2424
- Recursively scans `.py` files.
2525
- Applies cache-based skipping using file stat signatures.
26-
- Default cache location is project‑local: `<root>/.cache/codeclone/cache.json` (override via `--cache-dir`).
26+
- Default cache location is project-local: `<root>/.cache/codeclone/cache.json`
27+
(override via `--cache-path`, legacy alias: `--cache-dir`).
2728

2829
---
2930

0 commit comments

Comments
 (0)