stray-todo
A marker of work left for later.
- Group
- Text
- Runs
- Optional: run it with
ur lint --rule stray-todo - Level
- warning
- Reads
- Every file
- Fix
- None: what finishing the work means is the author's to say
Why
The file marks work left for later with TODO, TBD, FIXME, WIP, XXX, or HACK followed by a colon or a parenthesis. Such a marker outlives the change that wrote it and says the code is not done. Finish the work, or track it where work is tracked. The rule reads every text file, whatever its language, and runs where [lint.stray-todo] turns it on.
The fix, as Ur suggests it: finish the work, or track it where work is tracked.
For agents
Leave no TODO, TBD, FIXME, WIP, XXX, or HACK markers: finish the work, or track it where the project tracks work.
Example
app/coupons.pydef apply_coupon(order, coupon):
if coupon.expired:
raise ValueError("coupon has expired")
# TODO: stop a coupon from being used twice on one order
order.discount = coupon.amount
return order
$ ur lint --rule stray-todo
warning[stray-todo]: `TODO` left in the code
--> ./app/coupons.py:4:7 `TODO`
= hint: finish the work, or track it where work is tracked
0 clone classes and 1 text finding in 1 file