A comment marks unfinished work with TODO, FIXME or XXX

tx0/ts:todo-commentstrictnotemaintainability

What it finds

TODO and FIXME mark work that was left for later. Listing them keeps that work visible instead of letting it age in the code unnoticed.

A comment is reported when it contains TODO, FIXME or XXX as a word in upper case. The level is a note, since such a comment is a reminder rather than a defect.

From the rule's source, todo_comment.rs.

Example from the rule's tests
export function f() {  // TODO: handle errorstx0 reports: marks unfinished work  /* FIXME later */ return 1;tx0 reports: marks unfinished work}// The method todos() returns items.
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/ts:todo-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/ts:todo-comment] reason="..."

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