Tuesday, January 27, 2015

Using coder.module to auto-format your code with drush

Coder  is a one of the best Drupal module to format / clean your Drupal codes.

Find more details about it here

After installed coder module, got to http://your-site/admin/config/development/coder

Select module / theme which is needs to be cleaned and click RUN REVIEWS.

You will get report as listed below.

you can automate this process by one line Drush command (drush coder-format ../path/to/your/module).

// download coder module
drush dl coder
// enable this module
drush en coder // drush en coder -y (Yes by default)
// auto format Or clean code
drush coder-format sites/all/modules/custom/your-module - path to your module

Note: Its cleaning inc,tpl,module,install files. Not cleaning js & css files.
Link to original post.

No comments:

Post a Comment