From a2f0afb6badefc1b50eae6523eea1e47b98cc234 Mon Sep 17 00:00:00 2001 From: Chris Tran Date: Tue, 7 Jan 2025 16:32:47 -0600 Subject: [PATCH] ci: update linter and formatter to ignore generated folder --- .github/workflows/on-pull-request.yml | 2 +- .php-cs-fixer.dist.php | 2 +- composer.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index c1fb68b..9d24a26 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -22,7 +22,7 @@ jobs: php-version: '8.1' tools: phpcs, cs2pr - name: Lint - run: phpcs -q --standard=PSR12 --report=checkstyle src | cs2pr + run: phpcs -q --standard=PSR12 --report=checkstyle --ignore=src/generated/* src | cs2pr format: name: Format runs-on: ubuntu-latest diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 0115076..9c52e44 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -3,7 +3,7 @@ $finder = (new PhpCsFixer\Finder()) ->in(__DIR__) ->exclude([ - 'generated', + 'src/generated', ]) ; diff --git a/composer.json b/composer.json index 5377f37..7cfd858 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,8 @@ } ], "scripts": { - "lint": "./vendor/bin/phpcs --standard=PSR12 --report=full src", - "phpcs-fix": "./vendor/bin/phpcbf --standard=PSR12 src", + "lint": "./vendor/bin/phpcs --standard=PSR12 --report=full --ignore=src/generated/* src", + "phpcs-fix": "./vendor/bin/phpcbf --standard=PSR12 --ignore=src/generated/* src", "format": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --rules=@PSR12" }, "require": {