-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update to YoastCS 1.3.0 #59
Conversation
... and update and add relevant Composer scripts.
Using a `.dist` extension allows for individual developers to overload the `phpcs.xml.dist` with a local `phpcs.xml` file. This file can include the `dist` file as a base ruleset using `<rule ref="./.phpcs.xml.dist"/>`. To facilitate this, the typical file names for the overloaded PHPCS config file have been added to the `.gitignore` file.
* Add XSD schema. * Set the command line arguments. * Remove `exclude-pattern`s which are already set via YoastCS. * Add configuration for the `WordPress.WP.I18n` sniff. * Add configuration for the `Yoast.Files.Filename` sniff and remove the exclusion. * Add configuration for the `WordPress.NamingConventions.PrefixAllGlobals` sniff.
There is one issue remaining for which a technical debt issue has been created - 50 -. For now, ignore these issues.
This code is only used when `WP_DEBUG` is on to display debugging information. Includes reformatting the surrounding function call for readability.
43c4baf
to
c6422a7
Compare
@jrfnl I believe this command is set in the |
CR done 👍 Acceptance 👍 The failing build is related to your question I guess |
Something like that. I honestly searched everywhere in the local plugin grunt configuration and could not find a way to remove it from there. (but |
Yes. That's it. |
grunt
phpcs
command, or rather then wholeshell
command should be disabled, but it is unclear to me how to do this. Help appreciated.The
grunt
shell
command does linting of the PHP files + a PHPCS check. This should not be done via grunt and the Travis script already contains a PHP lint command and with this PR a PHPCS check.This PR will be easiest to review by looking at each commit individually.
Composer: use YoastCS 1.3.0
... and update and add relevant Composer scripts.
Note: only the relevant PHPCS/YoastCS dependencies have been updated, the other dependencies have not been touched.
Travis: add CS check
CI/QA: rename PHPCS configuration file
Using a
.dist
extension allows for individual developers to overload thephpcs.xml.dist
with a localphpcs.xml
file. This file can include thedist
file as a base ruleset using<rule ref="./.phpcs.xml.dist"/>
.To facilitate this, the typical file names for the overloaded PHPCS config file have been added to the
.gitignore
file.Build/PHPCS: set up the PHPCS ruleset properly
exclude-pattern
s which are already set via YoastCS.WordPress.WP.I18n
sniff.Yoast.Files.Filename
sniff and remove the exclusion.WordPress.NamingConventions.PrefixAllGlobals
sniff.Build/PHPCS: add temporary exclusion
There is one type of issue remaining for which a technical debt issue has been created - #50 -.
For now, ignore these issues.
PHPCS: replace old-style ignore comment with new style
This code is only used when
WP_DEBUG
is on to display debugging information.Includes reformatting the surrounding function call for readability.
PHPCS: whitelist a used parameter
PHPCS: add reason to whitelist comment
Testing
PHPCS=1
environment variable.composer install
composer check-cs