From fa0d8ec7a415fc84c712141ed663fe4a72639237 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 27 Mar 2024 23:41:29 +0300 Subject: [PATCH 1/2] Fixed code-style.yml --- .github/workflows/code-style.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 91afa62..7666184 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -41,6 +41,16 @@ jobs: extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json coverage: none + - name: Setup Dependencies + run: | + composer global config --no-plugins allow-plugins.dragon-code/codestyler true + composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true + composer global config --no-plugins allow-plugins.symfony/thanks true + + composer config --no-plugins allow-plugins.dragon-code/codestyler true + composer config --no-plugins allow-plugins.ergebnis/composer-normalize true + composer config --no-plugins allow-plugins.symfony/thanks true + - name: Install dependency run: | composer global require dragon-code/codestyler From b3646536aebfa341eb12e20b91ef8eee0adcbcf1 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Wed, 27 Mar 2024 23:50:51 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 33f73ce..b2ca2f9 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,16 @@ jobs: extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, json coverage: none + - name: Setup Dependencies + run: | + composer global config --no-plugins allow-plugins.dragon-code/codestyler true + composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true + composer global config --no-plugins allow-plugins.symfony/thanks true + + composer config --no-plugins allow-plugins.dragon-code/codestyler true + composer config --no-plugins allow-plugins.ergebnis/composer-normalize true + composer config --no-plugins allow-plugins.symfony/thanks true + - name: Install dependency run: | composer global require dragon-code/codestyler @@ -250,6 +260,36 @@ jobs: labels: code-style ``` +You can also use a simplified version of the configuration by linking to our settings. + +In this case, the following settings will be applied: + +- Always checks if the event is not equal to `push` or the branch is not equal to `main` +- Correcting the code style will take the following steps: + - Will add the following plugins to the list + of [allowed plugins](https://getcomposer.org/doc/06-config.md#allow-plugins) + in your `composer.json` file: + - `dragon-code/codestyler` + - `ergebnis/composer-normalize` + - `symfony/thanks` + - Updates the `.github/dependabot.yml` file + - Updates the `.editorconfig` file + - Will correct the order of elements in the `composer.json` file to match + the [official schema](https://github.com/composer/composer/blob/main/res/composer-schema.json). + - Corrects the code style of your project. + +```yml +name: Code Style + +on: [ push, pull_request ] + +permissions: write-all + +jobs: + check: + uses: TheDragonCode/.github/.github/workflows/code-style.yml@main +``` + ### Other CI/CD ```bash