1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/tasks/annotations.rake

22 lines
635 B
Ruby
Raw Normal View History

2017-06-22 22:59:18 -04:00
# frozen_string_literal: true
require "rails/source_annotation_extractor"
2010-06-09 16:19:03 -04:00
desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)"
task :notes do
2012-10-14 06:03:39 -04:00
SourceAnnotationExtractor.enumerate "OPTIMIZE|FIXME|TODO", tag: true
end
namespace :notes do
["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
2010-06-09 16:19:03 -04:00
# 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