Skip to content

Commit

Permalink
Update PHP linting rules (godaddy-wordpress#518)
Browse files Browse the repository at this point in the history
* Update phpcs rules

* phpcs fixes

* re-add variable

* phpcs: Ignore unused parameter

* Update CI with new composer commands

* Set platform for composer

* Disable custom installers for phpcs CI jobs

* codeclimate fix

* CI: try creating the installer path

* ALL THE PERMS!

* fix typo

* MOAR PERMS

* super user doooooooooooo

Co-authored-by: AnthonyLedesma <[email protected]>
  • Loading branch information
jrtashjian and AnthonyLedesma authored May 19, 2020
1 parent 9179464 commit 5afb352
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 143 deletions.
14 changes: 8 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ jobs:
- run:
name: "Install Dependencies"
command: |
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
sudo chmod -R 777 ../../
mkdir -p ../../plugins/coblocks
composer install
- run:
name: "Run PHPCS"
command: phpcs --standard=phpcs.xml --extensions=php --colors -s -p -v .
command: composer lint

php73-phpcs:
docker:
Expand All @@ -85,11 +86,12 @@ jobs:
- run:
name: "Install Dependencies"
command: |
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
sudo chmod -R 777 ../../
mkdir -p ../../plugins/coblocks
composer install
- run:
name: "Run PHPCS"
command: phpcs --standard=phpcs.xml --extensions=php --colors -s -p -v .
command: composer lint

unit-tests:
docker:
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
]
}
},
"config": {
"platform": {
"php": "5.6"
}
},
"require": {
"php": ">=5.6",
"wpackagist-plugin/coblocks": "dev-trunk",
Expand Down
Loading

0 comments on commit 5afb352

Please sign in to comment.