Skip to content
main
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cmd
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

difftodo Build Status

Do you litter your code with XXX, TODO, and FIXME comments? Would you like to actually do those TODOs and fix those FIXMEs? If so, difftodo can help.

difftodo finds all the comments you've edited or added that are marked with XXX or TODO and then displays the output in a nice, human-readable way.

How to use it

For most things, you just need to run git todo.

If you've got uncommitted, unstaged changes, git todo will show all TODOs from those changes.

Otherwise, git todo will show all TODOs between your branch and master.

What do I need to do before merging this git branch?

$ git todo origin/master...
git-todo/Main.hs:62:
  -- TODO: Take git diff flags as options

git-todo/Main.hs:73:
  -- TODO: Read this as a bytestring from the start

git-todo/Main.hs:83:
  -- TODO: Use gitlib

What do I need to do before I can commit this?

$ git todo
git-todo/Main.hs:90:
  -- TODO: Factor out todo reporting

Have I staged any TODOs?

$ git todo --cached

What TODOs are left in my code base?

$ git todo --files
... too many to list here! ...

Advanced usage

git todo tries to do the right thing. If you want more control, then you can use the all-todos command, which shows all of the TODOs found in a particular file.

e.g.

$ all-todos ../src-todo/branch-review.py
../src-todo/branch-review.py:11:
  # XXX: Incorporate this into difftodo

You can also use diff-todo to extract TODOs from a diff. This is more or less how git todo works, so if you find yourself wanting a bit more control over what git todo does you can just use diff-todo, e.g.

$ git diff v1.0.1...v1.0.0 | diff-todo

Installing

macOS

$ brew tap jml/difftodo
$ brew install difftodo

From source

You need to have the following dependencies installed before you can build:

  • pcre
  • pkg-config

The preferred method is to build using Stack. In a checkout of the repository, run:

$ stack install

Note: the git todo command assumes that git is available on the PATH.

History

This was originally bzr-todo, and then became difftodo, and then got rewritten in Haskell.

Contributing

I'm very keen to make this better, but I'm also rather busy. Patches & issues are welcome, but there's no SLA on replies.

If you find difftodo useful, then please let me know.

About

Turns diffs into todo lists by parsing comments

Resources

License

Packages

No packages published