mirror of
https://gh.wpcy.net/https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2026-05-01 03:32:18 +08:00
Parallel-Lint, as the name implies, runs PHP lint in parallel, making it faster than native linting. It also provides more helpful output with a syntax highlighter code snippet showing the context of syntax errors. And lastly, it allows for easily running PHP linting over the files in a local dev environment. As we're now doing a full `composer install` on every build anyway, we may as well use this tool.
60 lines
1.9 KiB
JSON
60 lines
1.9 KiB
JSON
{
|
|
"name": "wp-coding-standards/wpcs",
|
|
"type": "phpcodesniffer-standard",
|
|
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
|
"keywords": [
|
|
"phpcs",
|
|
"standards",
|
|
"WordPress"
|
|
],
|
|
"license": "MIT",
|
|
"authors": [
|
|
{
|
|
"name": "Contributors",
|
|
"homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
|
|
}
|
|
],
|
|
"require": {
|
|
"php": ">=5.4",
|
|
"squizlabs/php_codesniffer": "^3.5.0",
|
|
"phpcsstandards/phpcsutils": "^1.0",
|
|
"phpcsstandards/phpcsextra": "^1.0"
|
|
},
|
|
"require-dev": {
|
|
"phpcompatibility/php-compatibility": "^9.0",
|
|
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0",
|
|
"phpcsstandards/phpcsdevtools": "^1.0",
|
|
"php-parallel-lint/php-parallel-lint": "^1.0",
|
|
"php-parallel-lint/php-console-highlighter": "^0.5"
|
|
},
|
|
"minimum-stability": "dev",
|
|
"prefer-stable": true,
|
|
"scripts": {
|
|
"lint": [
|
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git"
|
|
],
|
|
"check-cs": [
|
|
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcs"
|
|
],
|
|
"fix-cs": [
|
|
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf"
|
|
],
|
|
"install-codestandards": [
|
|
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
|
],
|
|
"run-tests": [
|
|
"@php ./vendor/phpunit/phpunit/phpunit --filter WordPress ./vendor/squizlabs/php_codesniffer/tests/AllTests.php"
|
|
],
|
|
"check-complete": [
|
|
"@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness -q ./WordPress"
|
|
],
|
|
"check-complete-strict": [
|
|
"@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness ./WordPress"
|
|
]
|
|
},
|
|
"support": {
|
|
"issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
|
|
"wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki",
|
|
"source": "https://github.com/WordPress/WordPress-Coding-Standards"
|
|
}
|
|
}
|