A comment marks unfinished work with TODO, FIXME or XXX
What it finds
# TODO: handle timeouts, # FIXME: a note about unfinished work. Listing them keeps them from being forgotten; this rule is in the strict tier for projects that want such notes tracked in an issue instead.
Reported are comments in which TODO, FIXME or XXX stands as a word in capitals.
From the rule's source, todo_comment.rs.
def load(path): # TODO: cache the resulttx0 reports: a TODO note marks unfinished work data = open(path).read() # FIXME handle encodingstx0 reports: a FIXME note marks unfinished work # todos are listed elsewhere return data 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:
[rules]
"tx0/python: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/python:todo-comment] reason="..."tx0 explain tx0/python:todo-comment shows the same in the terminal. Found a false positive? Report it.