Skip to content

Commit 6b93890

Browse files
committed
Updating composer commands to match webhooks. Added code quality workflow to run PHPStan, Psalm and PHP Codesniiffer.
1 parent d78fc07 commit 6b93890

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/workflows/code-quality.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ jobs:
3333
with:
3434
composer-options: "--no-progress"
3535

36-
- name: Run PHP CodeSniffer
37-
working-directory: plugins/${{ steps.plugin.outputs.slug }}
38-
run: composer run-script phpcs
39-
4036
- name: Run PHPStan
4137
working-directory: plugins/${{ steps.plugin.outputs.slug }}
4238
run: composer run-script phpstan
4339

4440
- name: Run Psalm
4541
working-directory: plugins/${{ steps.plugin.outputs.slug }}
46-
run: composer run-script psalm
42+
run: composer run-script php:psalm
43+
44+
- name: Run PHP CodeSniffer
45+
working-directory: plugins/${{ steps.plugin.outputs.slug }}
46+
run: composer run-script check-cs

plugins/hwp-previews/composer.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,22 @@
8787
}
8888
},
8989
"scripts": {
90-
"phpcbf": "./vendor/bin/phpcbf -s",
91-
"phpcs": "./vendor/bin/phpcs",
92-
"phpstan": "./vendor/bin/phpstan analyse --memory-limit=-1",
93-
"psalm": "./vendor/bin/psalm --no-progress --show-info=false"
90+
"lint": "vendor/bin/phpcs",
91+
"phpcs-i": [
92+
"php ./vendor/bin/phpcs -i"
93+
],
94+
"check-cs": [
95+
"php ./vendor/bin/phpcs"
96+
],
97+
"fix-cs": [
98+
"php ./vendor/bin/phpcbf"
99+
],
100+
"phpstan": [
101+
"vendor/bin/phpstan analyze --ansi --memory-limit=1G"
102+
],
103+
"php:psalm": "psalm",
104+
"php:psalm:info": "psalm --show-info=true",
105+
"php:psalm:fix": "psalm --alter"
94106
},
95107
"scripts-descriptions": {
96108
},

0 commit comments

Comments
 (0)