slop/todo-without-issue
TODOs reference an issue
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.1.0 |
| Selected by | fleetlint-slop@v0.1.0 |
Requirement
Every TODO, FIXME, XXX or HACK comment names an issue: TODO(#123), TODO(ABC-123) or an issue URL on the same line.
Why
An untracked TODO is a wish; a tracked one has an owner and can be closed.
Check
For each item in:
codegrep("code", r'(^\s*\*|(^|\s)(//+|#+|/\*+))\s*(.*[^-\w])?(TODO|FIXME|XXX|HACK)([^-\w]|$)')item.text.matches(r'\b(TODO|FIXME|XXX|HACK)\b\s*\((#|[A-Z][A-Z0-9]+-)\d+\)|https?://\S+/(issues?|browse|-/issues|merge_requests|pull)/\S*\d')Fix
Open an issue and reference it, or do the work, or delete the note.
Agent instruction: Report each note; do not invent issue numbers.
See: https://fleetlint.org/baseline/#slop, https://fleetlint.org/slop/#comments-and-text
Generated by fleetlint docs from catalog v0.1.0.