grunt-drupal-tasks icon indicating copy to clipboard operation
grunt-drupal-tasks copied to clipboard

Defer to phpcs.xml file if present.

Open jhedstrom opened this issue 8 years ago • 4 comments

  • Fixes #311

jhedstrom avatar Jan 05 '17 19:01 jhedstrom

This probably needs some tests. Also, it may require changes to grunt-phpcs since even passing empty files, that module is still specifying the standard, etc:

Executing: vendor/bin/phpcs --report=full --standard=vendor/drupal/coder/coder_sniffer/Drupal,vendor/drupal/coder/coder_sniffer/DrupalPractice ""

jhedstrom avatar Jan 05 '17 19:01 jhedstrom

Need to add 2 warnings here:

  1. If phpcs paths/dirs are specified in Gruntconfig.js and there is a phpcs.xml file, need to warn that the grunt configs will be ignored.
  2. If there is a phpcs.xml file and there is a conflicting standard specified in Gruntconfig.js, warn that this standard should be set to phpcs.xml.

jhedstrom avatar Jan 17 '17 23:01 jhedstrom

@grayside I've added the first warning, but cannot remember how the second warning actually differs.

jhedstrom avatar Aug 31 '17 17:08 jhedstrom

Hmm, this still needs a bit of work I think. The standard in the phpcs file isn't actually being used as the code in quality.js is still specifying the standard.

jhedstrom avatar Aug 31 '17 17:08 jhedstrom