Skip to content

Commit

Permalink
Remove contao/code-quality again (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer authored Apr 4, 2024
1 parent ba10ed2 commit e5810c9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ jobs:
run: composer install --no-interaction --no-progress

- name: Run Rector
run: vendor/bin/rector --dry-run --no-progress-bar --ansi
run: vendor/bin/rector --dry-run --no-progress-bar

- name: Run ECS
run: vendor/bin/ecs check --no-progress-bar --ansi
run: vendor/bin/ecs check --no-progress-bar

- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"require-dev": {
"ausi/remote-git": "^0.2.5",
"contao/code-quality": "^1.0",
"contao/easy-coding-standard": "^6.12",
"contao/rector": "^1.2",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.5"
Expand Down Expand Up @@ -56,9 +57,9 @@
"@unit-tests",
"@phpstan"
],
"ecs": "@php vendor/bin/ecs check --fix --ansi",
"phpstan": "@php vendor/bin/phpstan analyze --ansi",
"rector": "@php vendor/bin/rector --ansi",
"unit-tests": "@php vendor/bin/phpunit --colors=always"
"ecs": "@php vendor/bin/ecs check --fix",
"phpstan": "@php vendor/bin/phpstan analyze",
"rector": "@php vendor/bin/rector",
"unit-tests": "@php vendor/bin/phpunit"
}
}
7 changes: 5 additions & 2 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
* @license LGPL-3.0-or-later
*/

use Contao\EasyCodingStandard\Set\SetList;
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\Operator\NoUselessConcatOperatorFixer;
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;

return ECSConfig::configure()
->withSets([__DIR__.'/vendor/contao/code-quality/config/ecs.php'])
->withSets([SetList::CONTAO])
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/ecs.php',
__DIR__.'/rector.php',
])
->withSkip([
MethodChainingIndentationFixer::class => [
Expand All @@ -33,5 +36,5 @@
->withParallel()
->withSpacing(Option::INDENTATION_SPACES, "\n")
->withConfiguredRule(HeaderCommentFixer::class, ['header' => "This file is part of Contao.\n\n(c) Leo Feyer\n\n@license LGPL-3.0-or-later"])
->withCache(sys_get_temp_dir().'/ecs_monorepo_cache')
->withCache(sys_get_temp_dir().'/monorepo_ecs_cache')
;
15 changes: 13 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,31 @@

declare(strict_types=1);

/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/

use Contao\Rector\Set\SetList;
use Rector\Config\RectorConfig;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;

return RectorConfig::configure()
->withSets([__DIR__.'/vendor/contao/code-quality/config/rector.php'])
->withSets([SetList::CONTAO])
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/ecs.php',
__DIR__.'/rector.php',
])
->withSkip([
JsonThrowOnErrorRector::class,
NullToStrictStringFuncCallArgRector::class,
])
->withParallel()
->withCache(sys_get_temp_dir().'/rector_monorepo_cache')
->withCache(sys_get_temp_dir().'/monorepo_rector_cache')
;

0 comments on commit e5810c9

Please sign in to comment.