TFS Build Custom Activity : TODO Counter

Article Source: https://geekswithblogs.net/charliemott

Tracking the count of TODO’s in your solution can be used for the following:

  • Use as an additional measure of code quality.
  • Predict estimated completion dates through use of a burndown chart.
  • Once in production, TODO’s can be a good measure of how much Technical Debt lives within a solution.

As such, I have created a “FilesTextSearch” WF activity that can be plugged into a TFS build template.  I’ve uploaded this as patch in the codeplex project.

The default configuration of this activity is used to count TODO’s in the solution code.

ActivityProperties 
 
- Search all directories below this base directory.
- Comma separated list of file extensions to search.
- List of strings to search (case insensitive).

This produces the following output in the build log:

ToDoLog2

Future Improvements

TODO Formatting

See my post on recommendations for TODO formatting: https://geekswithblogs.net/charliemott/archive/2011/11/22/todo-formatting.aspx.

This article is part of the GWB Archives. Original Author: charlie.mott

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.