Linking to external resources in ReSharper to-do items
ReSharper comes with a To-do Explorer that makes working with
TODO comments in code easier. We’ve seen we can navigate and manage to-do items, export them to a file, and define our own to-do patterns. In this post, let’s look at what ReSharper 2017.3 brings to the table.
This post is part of a series around working with to-do items in ReSharper. Keep in mind: we can also use Rider to work with to-do items!
- Working with to-do items in ReSharper
- Defining to-do patterns in ReSharper
- Linking to external resources in ReSharper 2017.3 to-do items
Linking to external resources in to-do items
This one is new in ReSharper 2017.3 – we can create a to-do item pattern that links to a URL. For example, we can create a new to-do pattern that checks for comments starting with a YouTrack issue number, typically in the format
XX-111. If we capture the issue number in a group, we can use it in the URL field below:
In the To-do Explorer, we can now see to-do items that match this regular expression. These to-do items will also be shown in source code, where the content that is matched in the “TAG” capture group contains a clickable link to our issue tracker. We can Ctrl+click it, or use Alt+Enter to navigate to the external link (or open the item in the To-do Explorer tool window).
In case you want to add a pattern to YouTrack, or GitHub, here are a few regular expression and URL patterns that can be used:
- YouTrack (make sure to edit the URL to match your YouTrack instance):
Matches comments similar to:
// RSRP-123 Issue
- GitHub (make sure to edit the URL to match your GitHub project):
Matches comments similar to:
// GH #123 Issue
If we now encounter a to-do item in code which links to an external issue, we can use Peek To-do link (Ctrl+Shift+click) to display the issue inline:
Download ReSharper 2017.3 and give it a try! We’d love to hear your feedback!
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…