Rails 2: Custom source annotations Jan 30

Rails 2.0 has the new rake notes:... tasks built in. If you annotate your code with OPTIMIZE, FIXME, or TODO comments, then rake notes will show all of them, rake notes:fixme will show just the FIXME comments.

What if you want annotations of other comments? I've been using XXX for a few years now, so I wrote the following in lib/tasks/notes.rake:

require 'source_annotation_extractor'

namespace :notes do
  desc "Enumerate all XXX annotations"
  task :xxx do
    SourceAnnotationExtractor.enumerate "XXX"
  end
end

Now I can run rake notes:xxx and see all my XXX comments in the project. They don't show up in the global rake notes task, but...

Add a comment

Add a comment

Name (required)
Email (won't be displayed)
URL (include http://)
Comment (required)