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

Defer to phpcs.xml file if present. #312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jhedstrom
Copy link
Member

@jhedstrom
Copy link
Member Author

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
Copy link
Member Author

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.

Copy link
Contributor

@grayside grayside left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra warning-handling requirement noted by @jhedstrom in comment.

@jhedstrom
Copy link
Member Author

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

@jhedstrom
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants