Rider Help

Using TODO Lists


Rider provides an easy way to track tasks and technical debt in your code — code items (comments, string literals, or identifiers) matching a specific pattern can be easily located in the whole solution using the TODO window.

TODO items are highlighted in the editor and on the marker bar according to their types (Edit, Normal, Question, Warning, Error). Colors are configurable on the Editor | TODO page or Rider settings (Ctrl+Alt+S).

TODO patterns

By default, Rider provides three predefined patterns for commonly used TODO items of the following types:

  • A comment containing TODO - Normal
  • A comment containing BUG - Error
  • A NotImplementedException in the code - Edit

You can also define your own patterns, so that you could quickly access your specific technical debt items in the TODO window.

To define a custom TODO pattern

  1. Open the Editor | TODO page of Rider settings (Ctrl+Alt+S).
  2. Click Add on the toolbar.
  3. Specify a regular expression with keywords that you want to detect in comments. For example, (\W|^)(?<TAG>Refactor)(\W|$)(.*).
  4. Optionally, specify whether the pattern is case sensitive.
  5. Select an icon for the pattern to define how matched items will be colored in the editor and in the TODO window.
  6. Click OK to add this pattern to the list.
  7. You can also edit or remove existing patterns.
  8. Click Save to apply the modifications and let Rider choose where to save them, or save the modifications to a specific settings layer using the Save To drop-down list. For more information, see layer-based settings.

To navigate between TODO items in the current file, use TODO marks on the marker bar.

To study TODO items in the whole solution

  1. Press Alt+6 or choose View | Tool Windows | TODO in the main menu.
  2. To study the source code of the selected item right in the window, click Preview Source /help/img/dotnet/2017.2/ThemedIcon.PreviewToggle.Screen.[Gray].png on the toolbar.
  3. In the TODO window that opens, click /help/img/dotnet/2017.2/ThemedIcon.Down.Screen.[Gray].png or /help/img/dotnet/2017.2/ThemedIcon.Up.Screen.[Gray].png to navigate to the next or previous item. To locate TODO items in the editor, double-click on them or choose Jump to Source context menu (F4).
    Optionally, you can turn on AutoScroll to source /help/img/dotnet/2017.2/ThemedIcon.AutoScrollToSource.Screen.[Gray].png so that items are located in the editor as soon as they get focus in the tool window.

Filtering TODO items

Depending on the size and age of the codebase, there may be lots of TODO items. To concentrate on specific items, you can filter TODO items by scope or by custom filter.

Initial filtering is available with the tabs of the TODO window:

  • You can use the Current File tab to see just the TODO items in the file active in the editor.
  • The Default Changelist tab becomes available when you enable VCS integration for the current solution; this tab will list TODO items from files with uncommitted local changes.
  • In the Scope Based tab, we can use the Scope selector to pick places where Rider should search for TODO items. You can also click ... to create your own scope.

Further filtering is available with custom filters, which let you create groups of TODO patterns that you are interested in.
You can create custom filters either on the Editor | TODO page of Rider settings (Ctrl+Alt+S) or by clicking on the filter icon /help/img/idea/2017.2/filter.png in the TODO window and choosing Edit Filters.

Last modified: 11 October 2017

See Also