Skip to content

Instantly share code, notes, and snippets.

@jleehr
Last active February 9, 2018 11:20
Show Gist options
  • Save jleehr/9aaebcc54e683b96536689b30510efac to your computer and use it in GitHub Desktop.
Save jleehr/9aaebcc54e683b96536689b30510efac to your computer and use it in GitHub Desktop.
Php Code Sniffer + Drupal
Global Coder Install
$ composer global require drupal/coder
PHPCS zur Pfadvariable hinzufügen in ~/.profile, ~/.bash_profile oder ~/.bashrc
export PATH="$HOME/AppData/Roaming/Composer/vendor/bin:$PATH"
Standards registrieren
$ phpcs --config-set installed_paths C:\Users\[USER]\AppData/Roaming/Composer/vendor/drupal/coder/coder_sniffer
Prüfung durchführen mit
$ phpcs --standard=Drupal,DrupalPractice docroot/modules/custom/
@see https://www.drupal.org/node/1419988
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment