views:

240

answers:

2

What tools do you use for automated code sanity checks and adhering to the coding conventions in your Ruby apps? How do you incorporate them into your process? (I mean tools like roodi, reek, heckle, rcov, dcov, etc.)

+1  A: 

The metric_fu gem might be perfect for what you need. From it's README: "Metric-fu is a set of rake tasks that make it easy to generate metrics reports. It uses Saikuro, Flog, Rcov, and Rails' built-in stats task to create a series of reports. It's designed to integrate easily with CruiseControl.rb by placing files in the Custom Build Artifacts folder." Since they converted it to a gem, it works with non-Rails applications as well. I'll bet you could add hooks for other tools as well.

Greg Borenstein
+1  A: 

There was some good discussion on this topic on the On-Ruby blog recently. For my personal development process I build quality tools into my tests, but only after all other tests have run. So I have a top-level rake task that looks something like this:

desc 'Runs all unit tests, acceptance tests and quality checks'
task 'test' => ['test:spec', 'test:features', 'test:quality']

I allow myself to commit if the last suite "fails", but I do try to get them to zero at least once each day.

kevinrutherford