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
Prem Sichanugrist 67cc450086 Move SourceAnnotationExtractor under Rails module
This class should be under Rails module as it belongs to Rails.
2018-03-22 17:06:14 +00:00

22 lines
657 B
Ruby

# frozen_string_literal: true
require "rails/source_annotation_extractor"
desc "Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)"
task :notes do
Rails::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
Rails::SourceAnnotationExtractor.enumerate annotation
end
end
desc "Enumerate a custom annotation, specify with ANNOTATION=CUSTOM"
task :custom do
Rails::SourceAnnotationExtractor.enumerate ENV["ANNOTATION"]
end
end