A comment marks work still to be done with TODO, FIXME, XXX or HACK

tx0/go:task-commentstrictnotemaintainability

What it finds

// TODO: handle retries: such comments record known gaps, and they tend to stay long after the context that explains them is gone. Listing them keeps them visible, so they can be done, turned into tracked issues, or removed.

A comment is reported when one of the words TODO, FIXME, XXX or HACK, in upper case, starts it or follows a space, and is followed by a colon, a parenthesis, a space or the end of the comment.

From the rule's source, task_comment.rs.

Example from the rule's tests
package p // TODO: retry on timeouts.tx0 reports: TODO marks work still to be donefunc f() {} // FIXME(ole) the cache is never clearedtx0 reports: FIXME marks work still to be donefunc g() {} // Describes TODOS and a todo list.func h() {}
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/go:task-comment" = "note"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/go:task-comment] reason="..."

tx0 explain tx0/go:task-comment shows the same in the terminal. Found a false positive? Report it.