FIXME

I keep most of my project planning in comments in the source files.

  • TODO: Usually main file has a bunch at the top, then I put more where I should add things later.
  • FIXME: Above or on the line where I know I need to keep working, this is broken/suboptimal.
  • XXX: Incomplete, often just needs cleaning up.
  • NOTE: Not a problem yet, but keep an eye on this.

Often I just find these while browsing my code, but to get a proper task list,
I type fixme.zsh and it searches, or fixme.zsh SOMEFILE to search one or more files.

The awful find|egrep line there avoids most of the generated files & junk. Adjust to your system.

save as fixme.zsh:

#!/bin/zsh
fixmes () {
    egrep -Hn -C1 "(FIXME|TODO|XXX|NOTE)" "$@" |grep -v "Binary file"
}

if [[ $# -eq 0 ]]; then
     find . -type f |egrep -v "/(\.|node_modules/|bin/|build/|dist/|assets/)" |while read f; do
        fixmes "$f"
    done
else
    fixmes "$@"
fi

Leave a Reply

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.