Coding Standards: Upgrade WPCS to 2.1.1.

Noteable changes:
- WPCS now throws warnings when non-strict comparisons are used. There are quite a few of them in Core. 🙃
- WPCS now detects and warns for assignments in loop conditions.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45600 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2019-07-05 02:49:53 +00:00
parent 6b61c34ded
commit e6b7205a8f
2 changed files with 9 additions and 9 deletions

View File

@ -11,7 +11,7 @@
}, },
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "~0.5.0", "dealerdirect/phpcodesniffer-composer-installer": "~0.5.0",
"wp-coding-standards/wpcs": "~2.0.0" "wp-coding-standards/wpcs": "~2.1.0"
}, },
"scripts": { "scripts": {
"format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source",

16
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "c7426ffeca8db395605e43bccf174b02", "content-hash": "54fbee5534d4ee1d332bb374c5442e79",
"packages": [], "packages": [],
"packages-dev": [ "packages-dev": [
{ {
@ -126,16 +126,16 @@
}, },
{ {
"name": "wp-coding-standards/wpcs", "name": "wp-coding-standards/wpcs",
"version": "2.0.0", "version": "2.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
"reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce" "reference": "bd9c33152115e6741e3510ff7189605b35167908"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce", "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908",
"reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce", "reference": "bd9c33152115e6741e3510ff7189605b35167908",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -148,7 +148,7 @@
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
}, },
"suggest": { "suggest": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
}, },
"type": "phpcodesniffer-standard", "type": "phpcodesniffer-standard",
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -167,7 +167,7 @@
"standards", "standards",
"wordpress" "wordpress"
], ],
"time": "2019-01-16T10:13:16+00:00" "time": "2019-05-21T02:50:00+00:00"
} }
], ],
"aliases": [], "aliases": [],