Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated code sanity check tools for Ruby

Tags:

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.)

like image 607
Milan Novota Avatar asked Jan 28 '09 13:01

Milan Novota


2 Answers

I'd suggest taking a look at RuboCop. It is a Ruby code style checker based on the Ruby Style Guide. It's maintained pretty actively and it's based on standard Ruby tooling (like the ripper library). It works well with Ruby 1.9 and 2.0 and has great Emacs integration.

like image 171
Bozhidar Batsov Avatar answered Sep 30 '22 15:09

Bozhidar Batsov


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.

like image 36
Greg Borenstein Avatar answered Sep 30 '22 16:09

Greg Borenstein