TODOs and code organization
↑At a glance
Section titled “At a glance”Rider can collect TODO comments from across a solution into a dedicated tool window. This is useful for local reminders and small technical-debt notes. A TODO comment is not a replacement for an issue with an owner, acceptance criteria or priority.
TODO syntax in C#
Section titled “TODO syntax in C#”// TODO: Add a test for the empty inventory case.// BUG: This conversion fails when a saved value exceeds int.MaxValue.// FIXME: Replace the temporary lookup before release.Rider ships with TODO patterns and lets you customize them under Settings → Editor → TODO. Built-in recognition includes TODO and BUG patterns; other labels such as FIXME may depend on your TODO pattern configuration. Check your keymap and patterns instead of assuming every word is indexed automatically.
Open and review tasks
Section titled “Open and review tasks”- Open View → Tool Windows → TODO.
- Filter or group the entries by relevant files and directories.
- Open a matched line, resolve the issue and remove or revise the comment.
- For team work, move actionable items into the issue tracker and link to an issue if your conventions allow it.
When to use what
Section titled “When to use what”| Situation | Better option | Why |
|---|---|---|
| Remember where you were debugging | Bookmark | No source change required |
| Explain a non-obvious rule | Ordinary comment | Context should stay near code |
| Note a tiny outstanding change | TODO comment | Easily searchable inside IDE |
| Track a release blocker | Issue | Needs visibility, priority and ownership |
| Explain method arguments | XML documentation | Helpful to API consumers and IDE tooling |
Example: a useful TODO
Section titled “Example: a useful TODO”// TODO(#142): Support migrations from save format v1 before enabling cloud sync.public SaveData Read(string path) { /* implementation */ throw new NotImplementedException(); }Prefer a task with a reason and, when appropriate, an issue identifier. Avoid keeping outdated TODOs for work that has already been completed.
Try it yourself
Section titled “Try it yourself”Add a TODO to a practice project, open the TODO tool window, then resolve the item and remove the marker. Compare that with placing an anonymous bookmark.
