Todosaurus is a tool that helps to work with TODO notes in software development projects.
It will help you to connect any TODO with an issue in the issue tracker, and make sure that no TODOs in the whole project's source code are left unattended.
The following components, useable separately, are included into Todosaurus:
- Todosaurus plugin for IntelliJ-based IDEs — allows to quickly create tracker issues from TODO notes.
- Todosaurus CLI — helps to verify the TODO notes from the command line.
- Todosaurus GitHub action — conveniently runs the CLI on GitHub.
- IntelliJ Plugin:
- CLI:
- GitHub Action: see the installation guide.
Read the documentation of each Todosaurus component if you want to know more.
Both Todosaurus components share a common TODO format.
A TODO is considered unresolved if it matches the regex pattern:
\b(?i)TODO(?-i)\b:?(?!\[.*?\])
That is, a case-insensitive word TODO (with an optional colon) that is not immediately followed by a bracketed issue reference like [#123].
Appending [#<number>] immediately after TODO marks it as resolved:
// TODO[#123]: Fix this code
A space before the bracket does not resolve the TODO — TODO [#123] is still considered unresolved.
Multiple TODOs on the same line are allowed. Each is matched independently — a [#issue] resolves only the TODO it immediately follows. The line is flagged if any unresolved TODO remains. For example:
// TODO[#1]: done TODO fix— flagged (second TODO is unresolved)// TODO[#1]: done TODO[#2]: also done— not flagged
Regions of a file can be excluded from scanning using marker comments:
// IgnoreTODO-Start
// TODO: this will not be reported
// IgnoreTODO-End
Lines between IgnoreTODO-Start and IgnoreTODO-End are skipped. The marker lines themselves are not scanned for TODOs.
The following are errors (non-zero exit code in the CLI):
- Unclosed
IgnoreTODO-Start(no matchingIgnoreTODO-Endbefore end of file) - Nested
IgnoreTODO-Start(opening a new region while one is already open) IgnoreTODO-Endwithout a matchingIgnoreTODO-Start- Multiple IgnoreTODO markers on the same line
- An IgnoreTODO marker and a TODO on the same line
- Changelog
- IntelliJ Plugin
- CLI
- Contributor Guide (General)
- Contributor Guide (IntelliJ Plugin)
- Contributor Guide (CLI)
- Maintainer Guide
The project is distributed under the terms of the MIT license (unless a particular file states otherwise).
The license indication in the project's sources is compliant with the REUSE specification v3.3.