Skip to content

Commit

Permalink
ci: update linter and formatter to ignore generated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ctran88 committed Jan 10, 2025
1 parent 77f4318 commit a2f0afb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'generated',
'src/generated',
])
;

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit a2f0afb

Please sign in to comment.