Browse Source

build: use ECS to fix coding standards

pull/9/head
Matthieu Marcillaud 4 weeks ago
parent
commit
2a8e544612
  1. 3
      composer.json
  2. 21
      ecs.php

3
composer.json

@ -30,7 +30,8 @@
"require-dev": {
"lolli42/finediff": "^1.0",
"phpunit/phpunit": "^8.3 || ^9.4",
"symfony/var-dumper": "^5.4 || ^6"
"symfony/var-dumper": "^5.4 || ^6",
"symplify/easy-coding-standard": "^11.1"
},
"repositories": [
],

21
ecs.php

@ -0,0 +1,21 @@
<?php
// ecs.php
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
return static function (ECSConfig $ecsConfig): void {
// A. full sets
#$ecsConfig->sets([SetList::PSR_12]);
$ecsConfig->sets([SetList::PSR_12, SetList::SYMPLIFY, SetList::COMMON, SetList::CLEAN_CODE]);
$ecsConfig->rule(NoExtraBlankLinesFixer::class);
$ecsConfig->indentation('tab');
$ecsConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
};
Loading…
Cancel
Save