feat(adr)!: #658 adr check verifies every file reference in a record #782
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!782
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-658-file-references"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
adr check now reads every file reference in a record - a markdown link resolved
from the record folder, a backticked path from the repo root - and fails when a
referenced file does not exist in the committed tree. A full URL is read through
its forge (skipped when forge checks are off); ~/ and / paths, placeholders, and
globs are skipped; a line number after a path fails. This can fail an existing
tree, so it ships in the breaking release.
Refs #658
adr check reads each file reference in a record and checks it resolves: a markdown link (resolved from the record's own folder) or a backticked path (resolved from the repo root). A plain path must exist in the committed tree, not only on disk. A full forge URL is read through that forge, and is skipped with --skip-remote-issues. A ~/ or / path, a placeholder or a glob (NNNN, *, <name>, {...}), and a link inside a fenced code block are not checked; a line number after a path fails. A backticked span counts as a path only when it has a slash and a dotted final segment, so a command, a flag, a config key, a directory, or an import path is left alone. The rule is named references. A forge-tagged test reads a real forge file URL; the unit tests cover the committed-tree, line-number, placeholder, glob, and base-resolution cases. Refs #658