Skip to content

todo-comment

Javastyleno fixdefault: offjava/google

Reports a line of a comment that starts with todo in any other case, or with TODO and no colon. Javadoc comments are not read.

A fixed form (TODO:) lets people and tools find the open items by one search. A variant spelled differently is not found.

To fix, write TODO:.

Reported
class A {
// TODO fix
// todo: lower
// TODO: good
// fix TODO later
// TODOS fix
/* line one
TODO second */
/**
* TODO javadoc
*/
void f() {} // Todo trailing
}
java:
lint:
rules:
todo-comment: warn # off (default), warn, error

Enabled by the presets: java/google.

Suppress one line with sudsy-disable-next-line todo-comment in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
checkstyle TodoComment partial The Google format only, no option.
checkstyle TodoFormat partial The check id of the Google TodoComment instance.