Add php-cs-fixer configuration
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
parent
80a3133cf5
commit
e8213d582c
|
@ -1,3 +1,7 @@
|
|||
# Composer
|
||||
composer.phar
|
||||
/vendor/
|
||||
|
||||
######################
|
||||
## Files build by make
|
||||
######################
|
||||
|
@ -249,3 +253,5 @@ Various
|
|||
build/
|
||||
coverage
|
||||
.phpunit.result.cache
|
||||
|
||||
.php_cs.cache
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once './vendor/autoload.php';
|
||||
|
||||
use Nextcloud\CodingStandard\Config;
|
||||
|
||||
$config = new Config();
|
||||
$config
|
||||
->getFinder()
|
||||
->ignoreVCSIgnored(true)
|
||||
->exclude('config')
|
||||
->exclude('data')
|
||||
->notPath('3rdparty')
|
||||
->notPath('composer')
|
||||
->notPath('vendor')
|
||||
->in(__DIR__);
|
||||
return $config;
|
13
Makefile
13
Makefile
|
@ -87,6 +87,16 @@ watch-js:
|
|||
build-svg-sprite:
|
||||
npm run svg_sprite
|
||||
|
||||
composer.phar:
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
install-composer-deps-dev: composer.phar
|
||||
php composer.phar install -o
|
||||
|
||||
update-composer: composer.phar
|
||||
rm -f composer.lock
|
||||
php composer.phar install --prefer-dist
|
||||
|
||||
# Removes the build directory and the compiled files
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
@ -182,3 +192,6 @@ test-php:
|
|||
test-php-coverage:
|
||||
phpunit -c phpunit.xml --coverage-clover=coverage-unit.xml
|
||||
phpunit -c phpunit.integration.xml --coverage-clover=coverage-integration.xml
|
||||
|
||||
lint-php:
|
||||
php composer.phar run-script cs:check
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
],
|
||||
"require": {},
|
||||
"require-dev": {
|
||||
"nextcloud/coding-standard": "^0.2.0",
|
||||
"phpunit/phpunit": "^7.5"
|
||||
},
|
||||
"config": {
|
||||
|
@ -18,6 +19,8 @@
|
|||
"classmap-authoritative": true
|
||||
},
|
||||
"scripts": {
|
||||
"cs:check": "php-cs-fixer fix --dry-run --verbose",
|
||||
"cs:fix": "php-cs-fixer fix",
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue