Linter¶
Health-check functions for vault integrity.
| Function | Returns | Description |
|---|---|---|
run_lint_vault(vault_dir) |
LintResult |
Check all notes for metadata, links, orphans, stale/expired notes |
run_lint_report(vault_dir) |
str |
Run lint and return formatted report string |
run_rot_audit(vault_dir, extended) |
ROTResult |
ROT Audit: redundant, outdated, trivial notes; extended=True for A2 scoring |
run_rot_report(vault_dir, extended) |
str |
Run ROT audit and return formatted report |
archive_stale_notes(vault_dir, dry_run) |
str |
Archive expired notes to 04_Archive/; dry_run=True for preview |
LintResult¶
Class container for lint check results.
| Attribute/Method | Type | Description |
|---|---|---|
total_notes |
int |
Number of scanned markdown notes |
untyped_files |
list[tuple[str, str]] |
List of notes with missing/invalid OKF metadata: (relative_path, reason) |
broken_links |
list[tuple[str, str]] |
List of broken internal links: (relative_path, link_target) |
orphans |
list[str] |
List of relative paths of notes with no inbound links |
stale_notes |
list[tuple[str, str]] |
List of expired notes: (relative_path, reason) (new in v1.6.0) |
has_issues (property) |
bool |
True if any untyped files, broken links, orphans, or stale notes are found |
format_report(vault_dir) |
str |
Generate a human-readable lint report |