-
Notifications
You must be signed in to change notification settings - Fork 40
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
WPCS 3.0: Fix ruleset tests #736
Commits on Dec 19, 2022
-
Composer: up the minimum PHPCS version to 3.7.1
Add support for PHP 8.1 features, including fixing a retokenization of reserved keywords bug in PHPCS 3.7.0.
Configuration menu - View commit details
-
Copy full SHA for cd7e371 - Browse repository at this point
Copy the full SHA cd7e371View commit details
Commits on Dec 20, 2022
-
Brings them more into line with the Composer scripts in WPCS.
Configuration menu - View commit details
-
Copy full SHA for a3acf35 - Browse repository at this point
Copy the full SHA a3acf35View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4aa628 - Browse repository at this point
Copy the full SHA b4aa628View commit details -
Composer: use develop branch of WPCS
VIPCS needs to be compatible with WordPress Coding Standards 3.0.0, which is currently in development on its `develop` branch. WPCS now uses some extra dependencies, which are also in development, so we need to allow for a minimum-stability of dev. Run `composer update -W` to pull those extra dependencies in.
Configuration menu - View commit details
-
Copy full SHA for 8fb8805 - Browse repository at this point
Copy the full SHA 8fb8805View commit details -
Uses the composer-normalize plugin to keep a consistent order.
Configuration menu - View commit details
-
Copy full SHA for 5a82c31 - Browse repository at this point
Copy the full SHA 5a82c31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b893ca - Browse repository at this point
Copy the full SHA 2b893caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b84ea8 - Browse repository at this point
Copy the full SHA 0b84ea8View commit details -
CS: Update WordPress-Extra exclusions
WordPress-Extra will no longer use the `Generic.Arrays.DisallowShortArraySyntax` rule, but does use the improved `Universal.Arrays.DisallowShortArraySyntax` from PHPCSExtra instead, so whilst we have short array syntax being used in the VIPCS sniffs, let's continue to exclude the rule.
Configuration menu - View commit details
-
Copy full SHA for b838219 - Browse repository at this point
Copy the full SHA b838219View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f6db81 - Browse repository at this point
Copy the full SHA 1f6db81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e6b16e - Browse repository at this point
Copy the full SHA 9e6b16eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 90a4658 - Browse repository at this point
Copy the full SHA 90a4658View commit details -
Add Sniff::merge_custom_array()
The previous `Sniff::merge_custom_array()` function was moved to a new Helper class in WPCS: WordPress/WordPress-Coding-Standards#2157. However, it is marked as non-public (only meant for WPCS directly), so copying into the VIPCS sniff is easiest for now.
Configuration menu - View commit details
-
Copy full SHA for e948dcb - Browse repository at this point
Copy the full SHA e948dcbView commit details -
Use PHPCSUtils MessageHelper::addMessage
This is more tested than the WPCS Sniff::addMessage().
Configuration menu - View commit details
-
Copy full SHA for 2bb34af - Browse repository at this point
Copy the full SHA 2bb34afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 03e7924 - Browse repository at this point
Copy the full SHA 03e7924View commit details -
Composer: Add PHPCSUtils as required dependency
VIPCS makes use of PHPCSUtils directly (such as for MessageHelper), so it should be marked as such in the Composer config.
Configuration menu - View commit details
-
Copy full SHA for 80ca8ab - Browse repository at this point
Copy the full SHA 80ca8abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5408a46 - Browse repository at this point
Copy the full SHA 5408a46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e8792d - Browse repository at this point
Copy the full SHA 8e8792dView commit details -
Ruleset tests: update for WPCS 3.0
The ruleset tests were failing mainly due to WordPress/WordPress-Coding-Standards#2108 which renamed some violation codes that we were excluding. The other change to account for was the replacement of a WPCS StrictComparisons sniff with a PHPCSExtras Universal sniff. The sniff in PHPCSExtra contains a fixer. As this is a risky fixer, this fixer is turned off for WPCS. The sniff in PHPCSExtra will provide metrics about loose versus strict comparisons.
Configuration menu - View commit details
-
Copy full SHA for 5ae2e23 - Browse repository at this point
Copy the full SHA 5ae2e23View commit details -
Ruleset tests: Add label before test runs
Make it clear which ruleset being tested, even on a test failure.
Configuration menu - View commit details
-
Copy full SHA for 92e10d3 - Browse repository at this point
Copy the full SHA 92e10d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6df86d - Browse repository at this point
Copy the full SHA d6df86dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b968b7 - Browse repository at this point
Copy the full SHA 1b968b7View commit details -
Validate the PHPCS installed standards in the quick test.
Configuration menu - View commit details
-
Copy full SHA for 5b33691 - Browse repository at this point
Copy the full SHA 5b33691View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce7d0c4 - Browse repository at this point
Copy the full SHA ce7d0c4View commit details