Skip to content

VBC-907: anonymous-todo

warning

Category: clean-code
Analysis: Regex (line by line)
File types: .js, .ts, .tsx, .py, .sh, .go, .rs, .java, .c, .cpp, .cs, .kt, .swift, .rb, .astro
Scope: comments only
Tags: clean-code

What it reports

Unattributed debt marker at line {line}. Nobody owns it, so nobody will fix it. Use TODO(owner): or reference an issue such as TODO: #123.

Flagged

js
// TODO: wire up retries
js
// TODO: drain the queue before closing

Not flagged

js
// a TODO. Sites that build a header from dynamic data need one
js
/// Reviewer note: `?` used to be a TODO no-op
js
// TODO(fab): wire up retries
js
// TODO: #123 wire up retries

Pattern

regex
^[^\n\w]*(?:TODO|FIXME|HACK|XXX)\b(?!\s*[\(\[][^)\]\n]+[\)\]])(?!\s*:?\s*(?:#\d+|[A-Z][A-Z0-9]+-\d+))

Released under the MIT License.