slop/todo-without-issue
TODOs reference an issue
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.8.0 |
| Selected by | fleetlint-slop@v0.8.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.
Sources
- https://google.github.io/styleguide/pyguide.html (style-guide, 3.12 TODO Comments)
- https://google.github.io/styleguide/cppguide.html (style-guide, TODO Comments)
- https://docs.astral.sh/ruff/rules/missing-todo-link/ (check, TD003)
- https://fleetlint.org/baseline/#slop
- https://fleetlint.org/slop/#comments-and-text
Generated by fleetlint docs from catalog v0.8.0.