-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Running phpcs on the Vagrant is undocumented #1182
Comments
It's available in the ansible environment at
/var/www/html/drupal/vendor/bin/phpcs. Same goes for phpcbf and phpunit.
Although making those globally available isn't a terrible idea.
…On Sun, Jun 23, 2019, 11:14 Mark Jordan ***@***.***> wrote:
phpcs is absent from the Vagrant. Looks like it was provided pre-Ansible
<#32>.
Running the following shell script from within the drupal install
directory, cribbed from the travis setup
<https://github.com/Islandora-CLAW/CLAW/blob/master/.scripts/travis_setup_drupal.sh#L6>,
works:
#!/bin/bash
echo "Install utilities needed for testing"
mkdir /opt/utilscd /opt/utilsif [ -z "$COMPOSER_PATH" ]; then
composer require drupal/coderelse
php -dmemory_limit=-1 $COMPOSER_PATH require drupal/coderfi
sudo ln -s /opt/utils/vendor/bin/phpcs /usr/bin/phpcs
phpcs --config-set installed_paths /opt/utils/vendor/drupal/coder/coder_sniffer
Not sure if using shell like this is cool within the Playbook.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1182>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE6PSH6NN745QXVME5T2GZDP36HPBANCNFSM4H2ZEEPA>
.
|
OK, cool. I think we should add a page the developer docs that explains how to use it. I can open a PR. |
In
Is there another step I should be taking? |
You have to provide the full path to the Drupal sniff.
/var/www/html/drupal/vendor/drupal/coder/coder_sniffer/Drupal
Definitely a documentation gap. I have phpcs and phpunit invocations burned
into my brain, which isn't terribly helpful for everyone else.
…On Sun, Jun 23, 2019, 12:43 Mark Jordan ***@***.***> wrote:
In /var/www/html/drupal, running ./vendor/bin/phpcs --standard=Drupal
web/modules/contrib/islandora/src/Plugin/Condition/MediaHasMimetype.php
results in the following:
ERROR: the "Drupal" coding standard is not installed. The installed coding
standards are MySource, PSR1, Squiz, PSR12, PEAR, Zend and PSR2
Is there another step I should be taking?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1182>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE6PSHZOQ3KY5KUDAOJITIDP36R33ANCNFSM4H2ZEEPA>
.
|
OK, in /var/www/html/drupal, running |
phpcs
is absent from the Vagrant. Looks like it was provided pre-Ansible.Running the following shell script from within the drupal install directory, cribbed from the travis setup, works:
Not sure if using shell like this is cool within the Playbook.
The text was updated successfully, but these errors were encountered: