Skip to content

Commit

Permalink
Merge pull request #9075 from paulbalandan/phpstan-scripts
Browse files Browse the repository at this point in the history
chore: add composer scripts for phpstan
  • Loading branch information
kenjis authored Jul 26, 2024
2 parents fbcc43a + cbd5024 commit 3e88f85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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"
}
}

0 comments on commit 3e88f85

Please sign in to comment.