Skip to content

Commit ab0f2bd

Browse files
committed
Use compose to install Wordpress standards for linter
1 parent 9963e63 commit ab0f2bd

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/package.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17+
- name: Install PHP_CodeSniffer + WordPress Standards
18+
run: |
19+
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
20+
composer global require --dev wp-coding-standards/wpcs:"^3.0"
21+
composer global require squizlabs/php_codesniffer
22+
~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs
23+
~/.composer/vendor/bin/phpcs -i
24+
1725
- name: Run PHP_CodeSniffer
18-
uses: php-actions/phpcs@v1
19-
with:
20-
php_version: '8.1'
21-
path: proxy-aware-https-fix.php
22-
standard: WordPress
26+
run: ~/.composer/vendor/bin/phpcs proxy-aware-https-fix.php --standard=WordPress --report=full
2327

2428
- name: Zip plugin
2529
run: zip -r proxy-aware-https-fix.zip proxy-aware-https-fix.php README.md LICENSE CHANGELOG.md

0 commit comments

Comments
 (0)