Skip to content
Extraits de code Groupes Projets
Valider d22a3787 rédigé par JamesRezo's avatar JamesRezo :tada:
Parcourir les fichiers

test: add Rector+ECS

parent d64df8d5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!12test: add Rector+ECS
......@@ -2,5 +2,6 @@
.gitignore export-ignore
.gitattributes export-ignore
/tests/ export-ignore
/plugin.xml export-ignore
/.php-cs-fixer.dist.php export-ignore
/phpunit.xml.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon.dist export-ignore
/vendor/
/composer.phar
/composer.lock
.php_cs.cache
/phpunit.xml
/.phpunit.cache
/phpstan.neon
/tmp/
/.php-cs-fixer.cache
/.php-cs-fixer.php
......@@ -14,7 +14,15 @@
},
"require-dev": {
"composer/composer": "^2.8",
"phpunit/phpunit": "^11.4"
"phpunit/phpunit": "^11.4",
"rector/rector": "^2.0",
"spip-league/easy-coding-standard": "^1.1"
},
"repositories": {
"spip": {
"type": "composer",
"url": "https://get.spip.net/composer"
}
},
"autoload": {
"psr-4": {
......@@ -31,5 +39,14 @@
"dev-main": "0.8.x-dev"
},
"class": "SpipLeague\\Composer\\SpipInstallerPlugin"
},
"scripts": {
"analyse": "vendor/bin/phpstan",
"check-cs": "vendor/bin/ecs check --ansi",
"fix-cs": "vendor/bin/ecs check --fix --ansi",
"rector": "vendor/bin/rector process --ansi",
"rector-dry-run": "vendor/bin/rector process --dry-run --ansi",
"test": "phpunit --colors --no-coverage",
"test-coverage": "@php -d xdebug.mode=coverage vendor/bin/phpunit --colors"
}
}
<?php
declare(strict_types=1);
use SpipLeague\EasyCodingStandard\Set\SetList;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return ECSConfig::configure()
->withSets([SetList::SPIP_LEAGUE])
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
->withRootFiles()
->withParallel()
;
......@@ -6,4 +6,5 @@ parameters:
phpVersion: 70400
paths:
- src
- tests
level: max
Fichier déplacé
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector;
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
return RectorConfig::configure()
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
->withRootFiles()
->withPhpSets(php74: true)
->withRules([LogicalToBooleanRector::class])
->withSkip([ NullToStrictStringFuncCallArgRector::class]);
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter