Juicy lil' bytes

Source Code TODO Logs

This one-liner parses your source file for TODO comments after any comment indicator character(s) and prints the message by line number to the standard output stream.

Usage

1
awk '/TODO/ {print NR "\t" ($1=$2="") $0}' <source filepath>

Example

Source

1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
# encoding: utf-8
# file: pydoc.py

## TODO this needs a lot of this and that
class PythonThreeDocCommand(sublime_plugin.TextCommand):

...

## TODO wow, did I really release it like this?
class PythonTwoDocCommand(sublime_plugin.TextCommand):

Command Line

1
2
3
$ awk '/TODO/ {print NR "\t" ($1=$2="") $0}' pydoc.py
10    this needs a lot of this and that
39    wow, did I really release it like this?

Use an all-caps TODO comment in your source (like I did above) or modify the regular expression /TODO/ in the awk script to whatever format you use. Limit the comment to a single line or add TODO at the beginning of additional lines in your comment block.