using git to scan source code to generate todo list etc

243 Views Asked by At

I have lots of comments in the source code marked as future todos.

e.g. #todo:improve api for common syntax

etc.

I am using git for version control.

I would like to list all my todo, with something like

git list todo.

If no such plugin exists, can you guide me, how do I write one myself?

1

There are 1 best solutions below

0
On BEST ANSWER

Assuming all your todos are single-line comments, you could use git grep:

git grep '#todo'

You could then use redirects to store it for future use, e.g.:

git grep '#todo' > ~/Documents/my_project_todo.txt