Feature Idea: PAReview.sh as installed extra #1197
Comments
@PieterDC - Definitely a valid request. I've considered adding a few workflow-specific tools to Drupal VM in the past (it is, after all, "Drupal" VM and not "generic PHP CMS VM"). However, since the tool would probably be used only by a small percentage of all Drupal VM users, I'd rather not maintain a separate role and/or functionality to grab the script, put it in place, etc. However, I would like to document how it can be done quickly/easily in this ticket for those who want to use it—either via a post provision script or task file... |
Also, note that this script is a wrapper around some tooling that is usually best as part of a Drupal project itself (e.g. how Acquia BLT wraps up coding standards reviews, PHPUnit tests, and Behat tests in a Drupal project codebase)—therefore I've been shying away from adding things like that directly to Drupal VM. |
Working on this now... I think we can get a script in the example scripts dir that will do 99% of the work, and then you just copy and paste a few variables into your config.yml to get the rest done :) Testing this on Honeypot now. Apparently I still have a master branch lurking in that project! See: https://www.drupal.org/node/2860293 |
Tested and working! Basically, you add the following to post_provision_scripts:
- "../examples/scripts/pareview.sh"
composer_global_packages:
- { name: hirak/prestissimo, release: '^0.3' }
- { name: drupal/coder, release: '^8.2' }
nodejs_version: "6.x"
nodejs_npm_global_packages:
- name: eslint See full docs here: https://github.com/geerlingguy/drupal-vm/blob/master/examples/scripts/pareview.sh |
Wow. Thanks! I created an internal task for our team to check this out with a suggestion on how to integrate this in our continuous deployment flow. |
Blog post with a detailed guide and more notes: Drupal's Contrib floodgates are open, PAReview your projects in Drupal VM!. |
A note to anyone else trying to use this... The mention of eslint in the config.yml needs to be formatted like this:
See: #1301 |
@attheshow - Is this documented incorrectly somewhere? I think I fixed my blog post (the one place I know I had mistyped the variable), but I want to try to make it so others don't run into the same issue :) |
In your comment here #1197 (comment) |
@oxyc oops! Fixed it. |
Issue Type
Feature Idea
Summary
Support PAReview.sh as optional extra because the Drupal project application checklist recommends it as a way to check coding standards and style. And it's better to be able to check those things before pushing Drupal code to a repo.
The text was updated successfully, but these errors were encountered: