Running Coder on patches through the command line

Submitted by doug on August 20, 2008 - 4:51pm

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

Submitted by Zlender on August 21, 2008 - 12:06am.

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