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
|
## Files build by make
|
||||||
######################
|
######################
|
||||||
|
@ -249,3 +253,5 @@ Various
|
||||||
build/
|
build/
|
||||||
coverage
|
coverage
|
||||||
.phpunit.result.cache
|
.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:
|
build-svg-sprite:
|
||||||
npm run 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
|
# Removes the build directory and the compiled files
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
@ -182,3 +192,6 @@ test-php:
|
||||||
test-php-coverage:
|
test-php-coverage:
|
||||||
phpunit -c phpunit.xml --coverage-clover=coverage-unit.xml
|
phpunit -c phpunit.xml --coverage-clover=coverage-unit.xml
|
||||||
phpunit -c phpunit.integration.xml --coverage-clover=coverage-integration.xml
|
phpunit -c phpunit.integration.xml --coverage-clover=coverage-integration.xml
|
||||||
|
|
||||||
|
lint-php:
|
||||||
|
php composer.phar run-script cs:check
|
||||||
|
|
|
@ -1,23 +1,26 @@
|
||||||
{
|
{
|
||||||
"name": "nextcloud/tasks",
|
"name": "nextcloud/tasks",
|
||||||
"description": "Nextcloud Tasks",
|
"description": "Nextcloud Tasks",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Bernhard Posselt",
|
"name": "Bernhard Posselt",
|
||||||
"email": "dev@bernhard-posselt.com"
|
"email": "dev@bernhard-posselt.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {},
|
"require": {},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^7.5"
|
"nextcloud/coding-standard": "^0.2.0",
|
||||||
},
|
"phpunit/phpunit": "^7.5"
|
||||||
"config": {
|
},
|
||||||
"optimize-autoloader": true,
|
"config": {
|
||||||
"classmap-authoritative": true
|
"optimize-autoloader": true,
|
||||||
},
|
"classmap-authoritative": true
|
||||||
"scripts": {
|
},
|
||||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
"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