Using git to scan the source code to create a todo list, etc.

I have a lot of comments in the source code, marked as future todos.

eg. #todo:improve api for common syntax

and etc.

I am using git for version control.

I would like to list all mine todo

, with something like

git list todo.

      

If no such plugin exists, can you advise me how I should write it myself?

Thank.

+3


source to share


1 answer


Assuming all of your todons are single line comments, you can use git grep

:

git grep '#todo'

      



Then you can use redirects to save in the future, for example:

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

      

+3


source







All Articles