diff options
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -62,4 +62,20 @@ task :console do sh "irb -rubygems -I lib -r ipaddress.rb" end - +desc "Look for TODO and FIXME tags in the code" +task :todo do + def egrep(pattern) + Dir['**/*.rb'].each do |fn| + count = 0 + open(fn) do |f| + while line = f.gets + count += 1 + if line =~ pattern + puts "#{fn}:#{count}:#{line}" + end + end + end + end + end + egrep /(FIXME|TODO|TBD)/ +end |