Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add composer scripts for phpstan #9075

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ jobs:
run: composer update --ansi --no-interaction

- name: Run static analysis
run: vendor/bin/phpstan analyse
run: composer phpstan:check
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
],
"analyze": [
"Composer\\Config::disableProcessTimeout",
"bash -c \"XDEBUG_MODE=off vendor/bin/phpstan analyse\"",
"@phpstan:check",
"vendor/bin/rector process --dry-run"
],
"cs": [
Expand All @@ -110,6 +110,8 @@
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff"
],
"metrics": "utils/vendor/bin/phpmetrics --config=phpmetrics.json",
"phpstan:baseline": "vendor/bin/phpstan analyse --ansi --generate-baseline=phpstan-baseline.php",
"phpstan:check": "vendor/bin/phpstan analyse --verbose --ansi",
"sa": "@analyze",
"style": "@cs-fix",
"test": "phpunit"
Expand All @@ -119,6 +121,8 @@
"cs": "Check the coding style",
"cs-fix": "Fix the coding style",
"metrics": "Run PhpMetrics",
"phpstan:baseline": "Run PHPStan then dump all errors to baseline",
"phpstan:check": "Run PHPStan with support for identifiers",
"test": "Run unit tests"
}
}
Loading