Elevate Your Visual Studio TODOs

I recently had an instance when making a hot fix where I left some unintended code behind.   This is a constant worry of mine – trying to not forget to remove a temporary value during a quick true-up, or maybe a clearing a change only meant locally, deleting tweaks never meant to be committed.  I tried diligently setting up TODOs, but with large solutions, it became impossible to discern between future todos and immediate todos.

The Fix: Warn About TODOs Extension

Visual Studio Extension: Warn About TODOs

Luckily, I found a Visual Studio tool for this:  Warn About TODOs. This handy extension lets you flag your TODOs with varying degrees of severity and puts each in your error list, making them harder to miss.

The way it works is pretty simple.  By default, it flags anything with TODO as a “warning” and includes it in your error list.  If you want to specify your own specific phrases, you can include a file titled “todo-warn.config” in your project, or as I did, create a “todo-warn.config” and save it under your %appdata% folder (appdata/roaming).  Then, it will apply to all projects you work with.

Here’s an example of the config file I am using:

[WARN]for-review
[WARN]for review
[INFO][STARTS(TODO)]
[WARN][STARTS(FIXME)]
[ERROR][CONTAINS(before check-in)]
[ERROR][CONTAINS(before check in)]
[ERROR][CONTAINS(before checkin)]
[ERROR][CONTAINS(--MYINITIALS--)]

One of my fave things about this is that even if a TODO is marked an error, the project will still build.  This allows me to run with what temporary changes I need, but marking that error list so I’m sure to see it before I commit.

You may also like