Skip to main content

How to handle a TODO in a pull request? [Resolved]

When I review the changes in a pull request, I sometimes stumble upon a comment with a "TODO" note which may be there for different reasons, in our case mostly because of:

  • the solution used to solve a problem can be improved, but would require significantly more time investment. An author chose a quicker solution but put a comment that a better option is potentially available
  • there is a temporary code to workaround an existing bug that should be fixed soon

Knowing that TODOs generally stay in the codebase for the lifetime of the codebase, how should I react to them in a pull request? How can I politely request to avoid it, or if it is really justified, how can I make sure the author of the PR would follow it up later in the future?


Question Credit: alecxe
Question Reference
Asked December 14, 2017
Posted Under: Programming
17 views
1 Answers

  • Write it down in your DoD that TODO, FIXME, or similar tags must be avoided.
  • Use a static code analysis tool such as SonarQube to automatically mark the build unstable.
  • Temporarily allow them if, and only if, there is a corresponding ticket in your issue tracker. Then, the code may look like TODO [ID-123] Description ...

credit: beatngu13
Answered December 14, 2017
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA