Support for custom annotations with rake notes:custom and DRY up the task definition.
e.g. rake notes:custom ANNOTATION=WTF
This commit is contained in:
parent
7098143f07
commit
dc2d754d60
@ -6,18 +6,15 @@ task :notes do
|
|||||||
end
|
end
|
||||||
|
|
||||||
namespace :notes do
|
namespace :notes do
|
||||||
desc "Enumerate all OPTIMIZE annotations"
|
["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
|
||||||
task :optimize do
|
desc "Enumerate all #{annotation} annotations"
|
||||||
SourceAnnotationExtractor.enumerate "OPTIMIZE"
|
task annotation.downcase.intern do
|
||||||
|
SourceAnnotationExtractor.enumerate annotation
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Enumerate all FIXME annotations"
|
desc "Enumerate a custom annotation, specify with ANNOTATION=WTFHAX"
|
||||||
task :fixme do
|
task :custom do
|
||||||
SourceAnnotationExtractor.enumerate "FIXME"
|
SourceAnnotationExtractor.enumerate ENV['ANNOTATION']
|
||||||
end
|
|
||||||
|
|
||||||
desc "Enumerate all TODO annotations"
|
|
||||||
task :todo do
|
|
||||||
SourceAnnotationExtractor.enumerate "TODO"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user