Skip to content

Instantly share code, notes, and snippets.

@MikeNGarrett
Last active March 22, 2019 15:23
Show Gist options
  • Save MikeNGarrett/19f2a5ebfea261b9fe8f0a41e67e0d84 to your computer and use it in GitHub Desktop.
Save MikeNGarrett/19f2a5ebfea261b9fe8f0a41e67e0d84 to your computer and use it in GitHub Desktop.
PHPCS config for multiple installed paths - WordPress, Drupal, PHP Compatibility
# Set multiple install paths for phpcs.
# This example adds configs for WordPress, Drupal, and PHP compatibility.
# NOTE: change `/full/path/to/` to the path to your composer directory.
phpcs --config-set installed_paths "/full/path/to/.composer/vendor/wp-coding-standards/wpcs/,/full/path/to/.composer/vendor/drupal/coder/,/full/path/to/composer/vendor/phpcompatibility/php-compatibility/"
# Solves the error: PHPCS Response ERROR: Referenced sniff "WordPress-Extra" does not exist. Run "phpcs --help" for usage information
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment