A comment marks work left to do with TODO, FIXME or XXX

tx0/java:task-commentstrictnotemaintainability

What it finds

TODO, FIXME and XXX comments mark work that was left for later. Reported, they show up in the list of findings, where they can be planned instead of forgotten.

A marker counts when it is a word of its own in upper case, followed by nothing, a colon, a space or a parenthesis, as in // TODO(ana): ....

From the rule's source, task_comment.rs.

Example from the rule's tests
class Parser {  // TODO: handle escapestx0 reports: TODO marks work left to do  void parse() {    /* FIXME(ana) this drops the last token */tx0 reports: FIXME marks work left to do    int todos = 0;  }}
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/java: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/java:task-comment] reason="..."

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