Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active August 21, 2020 09:41
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Shelob9/b50f03b89d01c3e26b004960c7b84455 to your computer and use it in GitHub Desktop.
{
"scripts" : {
"tests" : "composer fixes && composer sniffs && composer lints && phpunit --coverage-clover coverage/clover.xml",
"sniffs" : "phpcs --standard=PSR2 src/ && phpcs --standard=PSR2 tests/",
"fixes" : "php-cs-fixer fix src/ && php-cs-fixer fix tests/",
"lints" : "parallel-lint ./src --blame --exclude vendor && parallel-lint ./tests --blame --exclude vendor"
}
}
{
"name": "example/example",
"type": "wordpress-plugin",
"license": "GPL-2.0",
"minimum-stability": "dev",
"require": {
"php" : "^5.6"
},
"require-dev" : {
"phpunit/phpunit": "^6.1",
"php-coveralls/php-coveralls": "^2.0@dev",
"squizlabs/php_codesniffer": "3.*",
"friendsofphp/php-cs-fixer": "^2.9",
"jakub-onderka/php-parallel-lint": "dev-master",
"jakub-onderka/php-console-highlighter": "dev-master",
},
"autoload": {
"psr-4": {
"example\\example\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"example\\example\\Tests\\": "tests/"
}
},
"scripts" : {
"tests" : "composer fixes && composer sniffs && composer lints && phpunit --coverage-clover coverage/clover.xml",
"tests-now" : "phpunit --group=now",
"sniffs" : "phpcs --standard=PSR2 src/ && phpcs --standard=PSR2 tests/",
"fixes" : "php-cs-fixer fix src/ && php-cs-fixer fix tests/",
"lints" : "parallel-lint ./src --blame --exclude vendor && parallel-lint ./tests --blame --exclude vendor"
},
"config": {
"optimize-autoloader": true,
"platform": {
"php" : "^5.6"
}
}
}
compsoer require friendsofphp/php-cs-fixer --dev
composer require squizlabs/php_codesniffer --dev
composer require jakub-onderka/php-parallel-lint
{
"scripts" : {
"sniffs" : "phpcs --standard=PSR2 src/ && phpcs --standard=PSR2 tests/",
"fixes" : "php-cs-fixer fix src/ && php-cs-fixer fix tests/",
"lints" : "parallel-lint ./src --blame --exclude vendor && parallel-lint ./tests --blame --exclude vendor"
}
}
{
"scripts" : {
"sniffs" : "phpcs --standard=PSR2 src/ && phpcs --standard=PSR2 tests/",
"fixes" : "php-cs-fixer fix src/ && php-cs-fixer fix tests/"
}
}
{
"scripts" : {
"sniffs" : "phpcs --standard=PSR2 src/ && phpcs --standard=PSR2 tests/"
}
}
@ninovandenheuvel
Copy link

Really curious on this. Will see if I can add it to my projects.
It does seems 'install-code-fixer.sh' has a typo in composer command.

@virtualLast
Copy link

"lints" : "parallel-lint ./src --blame --exclude vendor && parallel-lint ./Tests --blame --exclude vendor && parallel-lint ./public --blame --exclude vendor && parallel-lint ./admin --blame --exclude vendor && parallel-lint ./includes --blame --exclude vendor"

I have adjusted the lints portion for my project, but when I run composer lints it says no file found to check and errors with code 225, any idea's here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment