This is a new Battleplan past. Last year we gave Coder Review a facelift with regards to code cleanup, the ignore system, and PHP_CodeSniffer.
The following was discussed at the Prague Code Sprint with stella, jjchinquist, and forestmars, as well as discussed with a few random people. But before we embark on this too deeply, I would like more feedback.
This year I'd like to bring the Coder projects (Review, Upgrade, Drush, Grammer Parser, PHP CodeSniffer, etc) together in an integrated way. I propose that we re-organize the project into a Drush plugin that is Drupal version agnostic and keep the current project as only a UI module. Here are the specifics:
- The Drush plugin will be a new Drupal module (not on github but hosted on Drupal) and we'll maintain all of the code in the master branch.
- The Drush plugin will get a new upgrade command, yet to be designed, possibly based on Coder Upgrade or ideas from Coder Upgrade, or possibly based on https://github.com/fabpot/PHP-CS-Fixer and Twigify.
- The Drush plugin will contain all of the review rules, and the UI will need to call the plugin as a library that returns results.
- In 7.x, we'll start a 3.x branch of coder and this will be the UI module. It will still be called Coder Review in 7.x. 3.x Coder Review will use Drush Coder as a library and will get it's results from that library. Coder Upgrade will stay unchanged.
- Coder Upgrade will be removed in 8.x, and Coder Review will just become Coder again. Coder Upgrade functionality will be in Coder Drush and the old module won't be necessary anymore. We're leaving it in the 7.x branch for people still using the 6.x to 7.x upgrades. Coder Review, which is just the UI portion, now will become just coder.module.
- I hope that the Drush plugin upgrade command will alleviate the need or desire to continue with Coder Upgrade. (But if we mostly agree on this path and we go down this road, and someone disagrees, they are free to continue Coder Upgrade as a separate project.)
My plan is to write the framework and one or two upgrade examples, but we'll need the community to write the bulk of the reviews.
Coder (coder review) and Deadwood (coder upgrade) predate Drush. At the time I wrote Coder I was against re-writing code from the web interface (Apache) for security reasons. So we focused solely on identifying issues. A few years later Deadwood was created, and it chose to do something I was unwilling to do, rewrite code through the web interface. It also included a PHP command line though, that was fine to use without security concerns. We merged the two projects, but only in name. They never have played well together and have been mostly maintained independently.
- Is the dependency on drush OK, if we fix the plugin/module issue and the gplib/grammer_parser dependency issue