aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/tasks/annotations.rake
blob: 10a9311b2d75828f2b844c1709371929785ac7f8 (plain) (tree)
1
2
3
4
5
6
7
8
                                           






                                                                         




                                                    

     
                                                                      

                                                         

     
require 'rails/source_annotation_extractor'

desc "Enumerate all annotations"
task :notes do
  SourceAnnotationExtractor.enumerate "OPTIMIZE|FIXME|TODO", :tag => true
end

namespace :notes do
  ["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
    desc "Enumerate all #{annotation} annotations"
    task annotation.downcase.intern do
      SourceAnnotationExtractor.enumerate annotation
    end
  end

  desc "Enumerate a custom annotation, specify with ANNOTATION=CUSTOM"
  task :custom do
    SourceAnnotationExtractor.enumerate ENV['ANNOTATION']
  end
end