Set up PHPCS pre-commit hook
This commit is contained in:
parent
2b6d7bf29b
commit
bcf2e0340b
2 changed files with 128 additions and 0 deletions
13
composer.json
Normal file
13
composer.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"post-install-cmd": [
|
||||||
|
"PHPCodeChecker\\Installer::postInstall"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"PHPCodeChecker\\Installer::postInstall"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"wickedreports/phpcs-pre-commit-hook": "^0.7.0"
|
||||||
|
}
|
||||||
|
}
|
115
composer.lock
generated
Normal file
115
composer.lock
generated
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "957eb6c729bd4e3aa67e474d0bd31acc",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "squizlabs/php_codesniffer",
|
||||||
|
"version": "3.5.8",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||||
|
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
|
||||||
|
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-simplexml": "*",
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"ext-xmlwriter": "*",
|
||||||
|
"php": ">=5.4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/phpcs",
|
||||||
|
"bin/phpcbf"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"BSD-3-Clause"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Greg Sherwood",
|
||||||
|
"role": "lead"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||||
|
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
|
||||||
|
"keywords": [
|
||||||
|
"phpcs",
|
||||||
|
"standards"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
|
||||||
|
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
|
||||||
|
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
|
||||||
|
},
|
||||||
|
"time": "2020-10-23T02:01:07+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "wickedreports/phpcs-pre-commit-hook",
|
||||||
|
"version": "0.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/WickedReports/phpcs-pre-commit-hook.git",
|
||||||
|
"reference": "d376e83d5d8038cf9eb8e4cccc0fce160763e0ad"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/WickedReports/phpcs-pre-commit-hook/zipball/d376e83d5d8038cf9eb8e4cccc0fce160763e0ad",
|
||||||
|
"reference": "d376e83d5d8038cf9eb8e4cccc0fce160763e0ad",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"squizlabs/php_codesniffer": "3.*"
|
||||||
|
},
|
||||||
|
"type": "scripts",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"PHPCodeChecker\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"GPL-3.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Stanislav Malkin",
|
||||||
|
"email": "stan@wickedreports.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHPCS check before commit",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/WickedReports/phpcs-pre-commit-hook/issues",
|
||||||
|
"source": "https://github.com/WickedReports/phpcs-pre-commit-hook/tree/master"
|
||||||
|
},
|
||||||
|
"time": "2018-03-13T23:57:17+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": [],
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": [],
|
||||||
|
"platform-dev": [],
|
||||||
|
"plugin-api-version": "2.0.0"
|
||||||
|
}
|
Reference in a new issue