Use default name for PHPCS configuration file
This commit renames PHPCS configutarion file to `phpcs.xml`. With the default name, it is not necessary to use the argument `--standard=phpcs.ruleset.xml` anymore when calling `phpcs`.
This commit is contained in:
parent
d14d3afc2e
commit
bf052c14c7
|
@ -4,7 +4,7 @@ CHANGELOG.txt export-ignore
|
||||||
composer.* export-ignore
|
composer.* export-ignore
|
||||||
Gruntfile.js export-ignore
|
Gruntfile.js export-ignore
|
||||||
package.json export-ignore
|
package.json export-ignore
|
||||||
phpcs.ruleset.xml export-ignore
|
phpcs.xml export-ignore
|
||||||
phpunit.* export-ignore
|
phpunit.* export-ignore
|
||||||
README.md export-ignore
|
README.md export-ignore
|
||||||
tests export-ignore
|
tests export-ignore
|
||||||
|
|
|
@ -278,9 +278,6 @@ module.exports = function( grunt ) {
|
||||||
bin: 'vendor/bin/phpcs'
|
bin: 'vendor/bin/phpcs'
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
options: {
|
|
||||||
standard: './phpcs.ruleset.xml'
|
|
||||||
},
|
|
||||||
src: [
|
src: [
|
||||||
'**/*.php', // Include all files
|
'**/*.php', // Include all files
|
||||||
'!apigen/**', // Exclude apigen/
|
'!apigen/**', // Exclude apigen/
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"squizlabs/php_codesniffer": "*",
|
"squizlabs/php_codesniffer": "*",
|
||||||
"wp-coding-standards/wpcs": "^0.14",
|
"wp-coding-standards/wpcs": "^0.14",
|
||||||
"phpunit/phpunit": "6.2.3",
|
"phpunit/phpunit": "6.2.3",
|
||||||
"woocommerce/woocommerce-git-hooks": "1.0.3",
|
"woocommerce/woocommerce-git-hooks": "1.0.4",
|
||||||
"wimg/php-compatibility": "^8.0",
|
"wimg/php-compatibility": "^8.0",
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
|
||||||
},
|
},
|
||||||
|
@ -32,10 +32,10 @@
|
||||||
"phpunit"
|
"phpunit"
|
||||||
],
|
],
|
||||||
"phpcs": [
|
"phpcs": [
|
||||||
"phpcs -s -p --standard=./phpcs.ruleset.xml"
|
"phpcs -s -p"
|
||||||
],
|
],
|
||||||
"phpcbf": [
|
"phpcbf": [
|
||||||
"phpcbf -p --standard=./phpcs.ruleset.xml"
|
"phpcbf -p"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "f8dbe5807f695e87ad3453a8b629b6bf",
|
"content-hash": "3087b6ab17fe867f1edafd95c2bef430",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/installers",
|
"name": "composer/installers",
|
||||||
|
@ -127,16 +127,16 @@
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
||||||
"version": "v0.4.3",
|
"version": "v0.4.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/DealerDirect/phpcodesniffer-composer-installer.git",
|
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
|
||||||
"reference": "63c0ec0ac286d31651d3c70e5bf76ad87db3ba23"
|
"reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/DealerDirect/phpcodesniffer-composer-installer/zipball/63c0ec0ac286d31651d3c70e5bf76ad87db3ba23",
|
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08",
|
||||||
"reference": "63c0ec0ac286d31651d3c70e5bf76ad87db3ba23",
|
"reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
"stylecheck",
|
"stylecheck",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
],
|
||||||
"time": "2017-09-18T07:49:36+00:00"
|
"time": "2017-12-06T16:27:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/instantiator",
|
"name": "doctrine/instantiator",
|
||||||
|
@ -450,29 +450,35 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-docblock",
|
"name": "phpdocumentor/reflection-docblock",
|
||||||
"version": "4.1.1",
|
"version": "4.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
|
||||||
"reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2"
|
"reference": "66465776cfc249844bde6d117abff1d22e06c2da"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2",
|
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da",
|
||||||
"reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2",
|
"reference": "66465776cfc249844bde6d117abff1d22e06c2da",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.0",
|
"php": "^7.0",
|
||||||
"phpdocumentor/reflection-common": "^1.0@dev",
|
"phpdocumentor/reflection-common": "^1.0.0",
|
||||||
"phpdocumentor/type-resolver": "^0.4.0",
|
"phpdocumentor/type-resolver": "^0.4.0",
|
||||||
"webmozart/assert": "^1.0"
|
"webmozart/assert": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "^0.9.4",
|
"doctrine/instantiator": "~1.0.5",
|
||||||
"phpunit/phpunit": "^4.4"
|
"mockery/mockery": "^1.0",
|
||||||
|
"phpunit/phpunit": "^6.4"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"phpDocumentor\\Reflection\\": [
|
"phpDocumentor\\Reflection\\": [
|
||||||
|
@ -491,7 +497,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
|
||||||
"time": "2017-08-30T18:51:59+00:00"
|
"time": "2017-11-27T17:38:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/type-resolver",
|
"name": "phpdocumentor/type-resolver",
|
||||||
|
@ -542,16 +548,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpspec/prophecy",
|
"name": "phpspec/prophecy",
|
||||||
"version": "v1.7.2",
|
"version": "1.7.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpspec/prophecy.git",
|
"url": "https://github.com/phpspec/prophecy.git",
|
||||||
"reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6"
|
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
|
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
|
||||||
"reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
|
"reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -563,7 +569,7 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "^2.5|^3.2",
|
"phpspec/phpspec": "^2.5|^3.2",
|
||||||
"phpunit/phpunit": "^4.8 || ^5.6.5"
|
"phpunit/phpunit": "^4.8.35 || ^5.7"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -601,20 +607,20 @@
|
||||||
"spy",
|
"spy",
|
||||||
"stub"
|
"stub"
|
||||||
],
|
],
|
||||||
"time": "2017-09-04T11:05:03+00:00"
|
"time": "2017-11-24T13:59:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "5.2.3",
|
"version": "5.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d"
|
"reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1",
|
||||||
"reference": "8e1d2397d8adf59a3f12b2878a3aaa66d1ab189d",
|
"reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -623,14 +629,13 @@
|
||||||
"php": "^7.0",
|
"php": "^7.0",
|
||||||
"phpunit/php-file-iterator": "^1.4.2",
|
"phpunit/php-file-iterator": "^1.4.2",
|
||||||
"phpunit/php-text-template": "^1.2.1",
|
"phpunit/php-text-template": "^1.2.1",
|
||||||
"phpunit/php-token-stream": "^2.0",
|
"phpunit/php-token-stream": "^2.0.1",
|
||||||
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
"sebastian/code-unit-reverse-lookup": "^1.0.1",
|
||||||
"sebastian/environment": "^3.0",
|
"sebastian/environment": "^3.0",
|
||||||
"sebastian/version": "^2.0.1",
|
"sebastian/version": "^2.0.1",
|
||||||
"theseer/tokenizer": "^1.1"
|
"theseer/tokenizer": "^1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-xdebug": "^2.5",
|
|
||||||
"phpunit/phpunit": "^6.0"
|
"phpunit/phpunit": "^6.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
|
@ -639,7 +644,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "5.2.x-dev"
|
"dev-master": "5.3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -654,7 +659,7 @@
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Sebastian Bergmann",
|
"name": "Sebastian Bergmann",
|
||||||
"email": "sb@sebastian-bergmann.de",
|
"email": "sebastian@phpunit.de",
|
||||||
"role": "lead"
|
"role": "lead"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -665,20 +670,20 @@
|
||||||
"testing",
|
"testing",
|
||||||
"xunit"
|
"xunit"
|
||||||
],
|
],
|
||||||
"time": "2017-11-03T13:47:33+00:00"
|
"time": "2017-12-06T09:29:45+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
"version": "1.4.2",
|
"version": "1.4.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
|
||||||
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
|
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
|
||||||
"reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
|
"reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -712,7 +717,7 @@
|
||||||
"filesystem",
|
"filesystem",
|
||||||
"iterator"
|
"iterator"
|
||||||
],
|
],
|
||||||
"time": "2016-10-03T07:40:28+00:00"
|
"time": "2017-11-27T13:52:08+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-text-template",
|
"name": "phpunit/php-text-template",
|
||||||
|
@ -806,16 +811,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-token-stream",
|
"name": "phpunit/php-token-stream",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
|
||||||
"reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0"
|
"reference": "791198a2c6254db10131eecfe8c06670700904db"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
|
||||||
"reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0",
|
"reference": "791198a2c6254db10131eecfe8c06670700904db",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -851,7 +856,7 @@
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tokenizer"
|
"tokenizer"
|
||||||
],
|
],
|
||||||
"time": "2017-08-20T05:47:52+00:00"
|
"time": "2017-11-27T05:48:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/phpunit",
|
"name": "phpunit/phpunit",
|
||||||
|
@ -1557,16 +1562,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "squizlabs/php_codesniffer",
|
"name": "squizlabs/php_codesniffer",
|
||||||
"version": "3.1.1",
|
"version": "3.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||||
"reference": "d667e245d5dcd4d7bf80f26f2c947d476b66213e"
|
"reference": "4064632daf602552d40dcff30a1658ab76fc1621"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d667e245d5dcd4d7bf80f26f2c947d476b66213e",
|
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4064632daf602552d40dcff30a1658ab76fc1621",
|
||||||
"reference": "d667e245d5dcd4d7bf80f26f2c947d476b66213e",
|
"reference": "4064632daf602552d40dcff30a1658ab76fc1621",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1604,7 +1609,7 @@
|
||||||
"phpcs",
|
"phpcs",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"time": "2017-10-16T22:40:25+00:00"
|
"time": "2017-12-18T00:24:01+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "theseer/tokenizer",
|
"name": "theseer/tokenizer",
|
||||||
|
@ -1750,16 +1755,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "woocommerce/woocommerce-git-hooks",
|
"name": "woocommerce/woocommerce-git-hooks",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/woocommerce/woocommerce-git-hooks.git",
|
"url": "https://github.com/woocommerce/woocommerce-git-hooks.git",
|
||||||
"reference": "a9ea000877a996c57862aa81f0e61c04d8973d7e"
|
"reference": "757ff1f16979c8eb0083df64199a2bd7b4d2bdf0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/woocommerce/woocommerce-git-hooks/zipball/a9ea000877a996c57862aa81f0e61c04d8973d7e",
|
"url": "https://api.github.com/repos/woocommerce/woocommerce-git-hooks/zipball/757ff1f16979c8eb0083df64199a2bd7b4d2bdf0",
|
||||||
"reference": "a9ea000877a996c57862aa81f0e61c04d8973d7e",
|
"reference": "757ff1f16979c8eb0083df64199a2bd7b4d2bdf0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "scripts",
|
"type": "scripts",
|
||||||
|
@ -1779,7 +1784,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "WooCommerce Git Hooks",
|
"description": "WooCommerce Git Hooks",
|
||||||
"time": "2017-11-09T18:27:22+00:00"
|
"time": "2017-12-18T13:34:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "wp-coding-standards/wpcs",
|
"name": "wp-coding-standards/wpcs",
|
||||||
|
|
|
@ -6,6 +6,6 @@ if [[ ${RUN_PHPCS} == 1 ]]; then
|
||||||
|
|
||||||
if [ "$CHANGED_FILES" != "" ]; then
|
if [ "$CHANGED_FILES" != "" ]; then
|
||||||
echo "Running Code Sniffer."
|
echo "Running Code Sniffer."
|
||||||
./vendor/bin/phpcs --ignore=$IGNORE --standard=./phpcs.ruleset.xml --encoding=utf-8 -n -p $CHANGED_FILES
|
./vendor/bin/phpcs --ignore=$IGNORE --encoding=utf-8 -n -p $CHANGED_FILES
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue