Skip to content
public-library›Rules›Documentation›Link every TODO and workaround to where it will be resolved

Link every TODO and workaround to where it will be resolved

Overview

Every TODO, FIXME, and workaround comment links the issue, pull request, or upstream document that tracks it.

Implementation

  • Link the tracker entry, not a person: // TODO(https://github.com/org/repo/issues/123): ..., not // TODO(alice): ....
  • For a workaround, link the upstream bug or documentation that explains the limitation, so a reader can check whether it still applies.
  • If no issue exists yet, open one before merging the comment.

Examples

Incorrect (counterexample):

// TODO: handle pagination

Nothing says who tracks it or when it matters.

Correct:

// TODO(https://github.com/fabricahq/greenfield/issues/412): page through results once orgs exceed 1,000 folders.

Validation

Search changed files for TODO, FIXME, and workaround comments, and check that each has a link to an issue, pull request, or upstream document.