Closed (won't fix)
Project:
Coder
Version:
7.x-1.x-dev
Component:
Coder Review
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 May 2011 at 18:06 UTC
Updated:
16 Jan 2016 at 18:31 UTC
Jump to comment: Most recent
Comments
Comment #1
pwolanin commentedSeconding this - doesn't seem like the code review should depend on being inside Drupal. Ideally coder could be installed as a drush extension independent of any drupal install.
Comment #2
ericduran commentedYeah, completely independent of Drupal would be great.
Sorry for the lame +1 :)
We can probably start by making a list of what in coder requires drupal to be bootstrapped.
Comment #3
steven jones commentedI've made a drush command that creates a temporary Drupal site, installs coder on it and does a review: http://drupal.org/project/standalone_coder_review which is a bit of a stop-gap until this issue can be sorted.
Comment #4
ericduran commentedI actually have a sandbox project where im bringin in some previous work from github. http://drupal.org/sandbox/ericduran/1337998
The drush command seems great but in short I really do think the code review process shouldn't touch or need drupal.
Comment #5
steven jones commented@ericduran this is great, and I fully agree that you should be able to validate the code style of Drupal without bootstrapping Drupal.
I know that open source is inherently fractured, but wonder if because coder has a larger install base currently wouldn't it be better to make that runnable from a lesser drush bootstrap level. Coder itself has two implementations for checking code style, and this would be a third. While I'm not against diversification it seems that efforts to improve the existing coder solution would make more sense than developing a new one.
Comment #6
ericduran commented@Steven Jones, Yes this totally makes sense. But what we realized is that we already had 3 different projects (excluding coder) that where actually trying to tackle the same problem. So instead of maintaing all those 3 project we decide to combine it into one.
I would love to get coder into a lower bootstrap which would benefit everyone, but at is core I think they are two completely different projects, one good example if it I want to run my syntax validator on a file I currently have open in my editor. This is a lot simpler by just running a single php command. Now this is definitely possible with with drush, but a php command is just simpler.
Also it should be noted what we're trying to do is use the same project other php projects use for syntax check. A great example of this is by using drupalcs you have out of the box support for other reporting tools such as a Jenkins plugins (Checkstyle, or Violations) and makes it soo much simpler to integrate with a continue integration environment such as Jenkins, bamboo, etc..
Also Coder, is great for people that might not have full access on there server and maybe just really want to check if there code is adhering to the coding standards.
In short both project are actually totally different, and I think is ok if both project live side by side for now.
Comment #7
douggreen commentedI just tested setting 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, and it appears to run fine, I've committed to 7.x-1.x-dev, but would appreciate someone double checking this doesn't cause them problems.
Comment #8
steven jones commentedIn theory, this change really shouldn't work, as the command uses functions from the module and Drupal's API, that aren't available at that bootstrap level.
I wonder if you've got the coder module installed in a Drupal site and are bootstrapping drush anyway?
Comment #9
douggreen commentedyes I am, I'll work on this later, leaving open.
Comment #10
klausiCoder 7.x-1.x is frozen now and will not receive any updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.