Skip to content

Commit

Permalink
chore: Configure code quality tools
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnynotsolucky committed Mar 13, 2024
1 parent 5da2901 commit e820c87
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- run: composer install --prefer-dist --no-progress
- name: Run rector --dry-run
run: |
vendor/bin/rector --memory-limit=1G --no-progress-bar
vendor/bin/rector --memory-limit=1G --no-progress-bar --dry-run
phpstan:
name: PHPStan
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

declare(strict_types=1);

use craft\ecs\SetList;
use fostercommerce\ecs\SetList;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return static function(ECSConfig $ecsConfig): void {
$ecsConfig->parallel();
$ecsConfig->paths([
__DIR__ . '/src',
__FILE__,
]);

$ecsConfig->sets([SetList::CRAFT_CMS_4]);
$ecsConfig->sets([
SetList::CRAFT_CMS_4,
]);
};
3 changes: 1 addition & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
includes:
- vendor/craftcms/phpstan/phpstan.neon
- vendor/fostercommerce/phpstan/phpstan.neon

parameters:
level: 0
paths:
- src
26 changes: 2 additions & 24 deletions rector.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php
declare(strict_types = 1);

use craft\rector\SetList as CraftSetList;
use Rector\Set\ValueObject\SetList;
use fostercommerce\rector\SetList;
use Rector\Config\RectorConfig;

return static function(RectorConfig $rectorConfig): void {
Expand All @@ -11,27 +10,6 @@
]);

$rectorConfig->sets([
SetList::PHP_81,
SetList::PHP_80,
SetList::PHP_74,
SetList::PHP_73,
SetList::PHP_72,
SetList::PHP_71,
SetList::PHP_70,
SetList::PHP_56,
SetList::PHP_55,
SetList::PHP_54,
SetList::PHP_53,
SetList::PHP_52,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::STRICT_BOOLEANS,
SetList::NAMING,
SetList::TYPE_DECLARATION,
SetList::EARLY_RETURN,
SetList::INSTANCEOF,
CraftSetList::CRAFT_CMS_40,
CraftSetList::CRAFT_COMMERCE_40,
SetList::CRAFT_CMS_40
]);
};

0 comments on commit e820c87

Please sign in to comment.