fixmefinder.rb

Here’s some code if anyone might find it interesting. I usually put FIXME comments in my code. As much usually I forgot abut them ;P

So here’s FixmeFinder. A ruby class to find lines which contain the string “FIXME” in a bunch of files. Sounds silly but if it’s useful to me, it may be for someone else.

I also use a rake task to find fixmes:

desc "Find FIXMEs in the code"
task :fixme do
  patterns = %w[
    lib/**/*.rb
    schema/**/*.sqlr
  ]
  FixmeFinder.new(patterns).find
end

It outputs something like:

$ rake fixme
schema/actions.sqlr:448: Check this type
schema/actions.sqlr:450: Check this type

Advertisement

3 thoughts on “fixmefinder.rb

  1. Here’s some code if anyone might find it interesting. I usually put FIXME comments in my code. As much usually I forgot abut them ;P

    So here’s FixmeFinder. A ruby class to find lines which contain the string “FIXME” in a bunch of files. Sounds silly but if it’s useful to me, it may be for someone else.

    I also use a rake task to find fixmes:

    desc "Find FIXMEs in the code"
    task :fixme do
      patterns = %w[
        lib/**/*.rb
        schema/**/*.sqlr
      ]
      FixmeFinder.new(patterns).find
    end

    It outputs something like:

    $ rake fixme
    schema/actions.sqlr:448: Check this type
    schema/actions.sqlr:450: Check this type
    

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s