Running Coder on patches through the command line

Doug Green

on

August 20, 2008

Running Coder on patches through the command line

Some time ago, Kieran approached me about the possibility of running coder on patches submitted to Drupal.org. Because of some outstanding work by Stella, and (of course) Moshe a.k.a. drush, Kieran's wish is now a possibility. The actual patch issue is here. I will cut an 6.x release candidate for Coder in the next couple days, which will include this feature. Currently, it's in the dev branch. Install the 6.x versions of drush and the 6.x-1.x-dev coder (if you try this today, you'll probably need to check it out of CVS). Then run coder from the drush command line. In place of the module name, pass either the full file path to the patch file or the url to the patch. For example,
$ drush coder style /tmp/my.patch
This opens the door to doing automatic coder style reviews on patches to drupal.org, as they are submitted or via cron! Some people will love this and others are gonna hate it :)

Like it? Share it!

""
This is great. Puting this on testing.drupal.org could save a lot of time.