Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] switch travis dummy cs check, to Github Actions and ECS with mar…
…kdown check
- Loading branch information
1 parent
b215860
commit 2c94c03
Showing
7 changed files
with
56 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Coding Standard | ||
|
||
on: | ||
pull_request: null | ||
|
||
jobs: | ||
coding_standard: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# see https://github.com/shivammathur/setup-php | ||
- uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.4 | ||
coverage: none | ||
|
||
- run: composer install --no-progress | ||
|
||
- run: vendor/bin/ecs check README.md --ansi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
composer.lock | ||
/vendor |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Clean Code PHP | ||
# Clean Code PHP | ||
|
||
## Table of Contents | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"require": { | ||
"php": "^7.2", | ||
"symplify/easy-coding-standard": "^8.3" | ||
}, | ||
"scripts": { | ||
"check-cs": "vendor/bin/ecs check README.md", | ||
"fix-cs": "vendor/bin/ecs check README.md --fix" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
use Symplify\EasyCodingStandard\Configuration\Option; | ||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void | ||
{ | ||
$parameters = $containerConfigurator->parameters(); | ||
$parameters->set(Option::PATHS, [__DIR__ . '/src', __DIR__ . '/config', __DIR__ . '/ecs.php']); | ||
|
||
$parameters->set(Option::SETS, [ | ||
SetList::COMMON, | ||
SetList::CLEAN_CODE, | ||
SetList::DEAD_CODE, | ||
SetList::PSR_12, | ||
SetList::PHP_70, | ||
SetList::PHP_71, | ||
SetList::SYMPLIFY, | ||
]); | ||
}; |