Skip to content

Commit

Permalink
Bring back easy-coding-standard
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee committed Jun 2, 2021
1 parent 905077e commit 2ec06c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ jobs:
name: Validate composer.json
run: composer validate --ansi --strict

-
name: Run ECS
run: vendor/bin/ecs check src/ spec/

-
name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/
Expand Down
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"phpstan/phpstan": "0.12.84",
"phpstan/phpstan-webmozart-assert": "0.12.12",
"phpunit/phpunit": "^9.5",
"sylius-labs/coding-standard": "^3.2",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^4.4 || ^5.2",
"symfony/debug-bundle": "^4.4 || ^5.2",
"symfony/dotenv": "^4.4 || ^5.2",
Expand All @@ -64,13 +64,11 @@
"Tests\\Sylius\\RefundPlugin\\Application\\": "tests/Application/src/"
}
},
"conflict": {
"symplify/package-builder": "8.3.25"
},
"scripts": {
"analyse": [
"@composer validate --strict",
"vendor/bin/phpstan analyse -c phpstan.neon -l max src/"
"vendor/bin/phpstan analyse -c phpstan.neon -l max src/",
"vendor/bin/ecs check src/ spec/"
],
"fix": [
"vendor/bin/ecs check src/ spec/ --fix"
Expand Down
6 changes: 0 additions & 6 deletions easy-coding-standard.yml

This file was deleted.

15 changes: 15 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;

return static function (ContainerConfigurator $containerConfigurator): void
{
$containerConfigurator->import('vendor/sylius-labs/coding-standard/ecs.php');

$containerConfigurator->parameters()->set(Option::SKIP, [
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
'**/var/*',
]);
};

0 comments on commit 2ec06c0

Please sign in to comment.