Add lint and lint-clean scripts to composer

This commit is contained in:
Dan Hensby 2020-05-05 16:32:54 +01:00
parent ede2d93363
commit e86cc8d872
No known key found for this signature in database
GPG Key ID: F76D6B5FE0626A99
2 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,7 @@ before_script:
script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml -vvv; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs code/ tests/; fi
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi
- if [[ $NPM_TEST ]]; then git diff-files --quiet -w --relative=client; fi
- if [[ $NPM_TEST ]]; then git diff -w --no-color --relative=client; fi
- if [[ $NPM_TEST ]]; then yarn run lint; fi

View File

@ -49,6 +49,10 @@
"colymba/gridfield-bulk-editing-tools": "Allows for bulk management of form submissions",
"silverstripe/gridfieldqueuedexport": "Export large submission as CSV through queued jobs in the background"
},
"scripts": {
"lint": "phpcs code/ tests/",
"lint-clean": "phpcbf code/ tests/"
},
"extra": {
"expose": [
"client/dist",