Skip to content

Commit

Permalink
skip rector for proto generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
cappuc committed Dec 4, 2023
1 parent 0d4d55f commit f573b74
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: shivammathur/setup-php@v2
with:
Expand All @@ -29,14 +27,7 @@ jobs:
mv proto-tmp/Nuwave/Lighthouse/Tracing/FederatedTracing/Proto src/Tracing/FederatedTracing/Proto
rm -rf proto-tmp
# It keeps changing things three times
- run: |
vendor/bin/rector process && vendor/bin/php-cs-fixer fix
vendor/bin/rector process && vendor/bin/php-cs-fixer fix
vendor/bin/rector process && vendor/bin/php-cs-fixer fix
- run: git pull
if: github.head_ref != ''
- run: vendor/bin/php-cs-fixer fix

- uses: stefanzweifel/git-auto-commit-action@v5
with:
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,4 @@ proto: up
${dcphp} rm -rf src/Tracing/FederatedTracing/Proto
${dcphp} mv proto-tmp/Nuwave/Lighthouse/Tracing/FederatedTracing/Proto src/Tracing/FederatedTracing/Proto
${dcphp} rm -rf proto-tmp
# It keeps changing things three times
$(MAKE) fix
$(MAKE) fix
$(MAKE) fix
$(MAKE) php-cs-fixer
1 change: 0 additions & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# buf.gen.yaml
version: v1
managed:
enabled: true
Expand Down
1 change: 1 addition & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
PHPUnitSetList::REMOVE_MOCKS,
]);
$rectorConfig->skip([
__DIR__ . '/src/Tracing/FederatedTracing/Proto',
__DIR__ . '/tests/database/migrations', // Does not fit autoloading standards
__DIR__ . '/tests/LaravelPhpdocAlignmentFixer.php', // Copied from Laravel
CallableThisArrayToAnonymousFunctionRector::class, // Callable in array form is shorter and more efficient
Expand Down

0 comments on commit f573b74

Please sign in to comment.