Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide support for running phpcs #12

Open
davereid opened this issue Jul 8, 2015 · 4 comments
Open

Provide support for running phpcs #12

davereid opened this issue Jul 8, 2015 · 4 comments
Milestone

Comments

@davereid
Copy link

davereid commented Jul 8, 2015

Having an example of how to use https://github.com/squizlabs/PHP_CodeSniffer or https://github.com/FriendsOfPHP/PHP-CS-Fixer would be nice for module:

Here's what we had in our .travis.yml file for a d8 module before switching to drupal_ti:

env:
  global:
    PHPCS_VERSION='2.0.*@dev'
    CODER_VERSION='8.2.0-alpha2'
before_install:
  composer global require squizlabs/php_codesniffer:$PHPCS_VERSION
  composer global require drupal/coder:$CODER_VERSION
  ln -s ~/.composer/vendor/drupal/coder/coder_sniffer/Drupal ~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/
script:
  phpcs --report=full --standard=Drupal $TRAVIS_BUILD_DIR/drupal/modules/$MODULE_NAME
@LionsAd
Copy link
Owner

LionsAd commented Jul 9, 2015

That sounds like a great idea to me!

@LionsAd LionsAd modified the milestones: 1.5.0, 1.6.0 Jul 15, 2015
@LionsAd
Copy link
Owner

LionsAd commented Jul 24, 2015

This will be a test suite 'runner', called phpcs-drupal.

@LionsAd LionsAd modified the milestones: 1.5.0, 1.6.0 Jul 28, 2015
@nerdstein
Copy link

I was curious if this has been completed yet

@AlexSkrypnyk
Copy link

you can install DCR (https://github.com/alexdesignworks/dcr) via composer that will handle all required phpcs dependencies, including Drupal and DrupalSecure

@LionsAd LionsAd modified the milestones: 1.5.0, 1.6.0 Dec 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants