Skip to content

feat(ci): add scripts to quickly check and fix code styles#8469

Merged
bshaffer merged 3 commits intomainfrom
add-style-check-and-fix-scripts
Aug 1, 2025
Merged

feat(ci): add scripts to quickly check and fix code styles#8469
bshaffer merged 3 commits intomainfrom
add-style-check-and-fix-scripts

Conversation

@bshaffer
Copy link
Copy Markdown
Contributor

@bshaffer bshaffer commented Jul 23, 2025

Now you can run both styles checkers with one line:

composer style-check
# > vendor/bin/php-tools cs-fixer googleapis/google-cloud-php
# > vendor/bin/phpcs --standard=phpcs-ruleset.xml -p

And if that fails you can fix it with another one-liner:

composer style-fix
# > vendor/bin/php-tools cs-fixer googleapis/google-cloud-php --flags ""
# > vendor/bin/phpcbf --standard=phpcs-ruleset.xml -p

And for consistency, you can also use composer phpstan as a shortcut to running dev/sh/static-analysis:

composer phpstan
# > dev/sh/static-analysis

@bshaffer bshaffer requested review from a team July 23, 2025 21:43
@bshaffer bshaffer added the next release PRs to be included in the next release label Jul 29, 2025
@bshaffer bshaffer merged commit 8f20636 into main Aug 1, 2025
35 checks passed
@bshaffer bshaffer deleted the add-style-check-and-fix-scripts branch August 1, 2025 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next release PRs to be included in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants