MNT Update how phpcs is called

This commit is contained in:
Steve Boyd 2020-11-06 13:11:01 +13:00 committed by Serge Latyntcev
parent b62a6c66d1
commit ee4c391682
3 changed files with 4 additions and 6 deletions

View File

@ -45,7 +45,7 @@ before_script:
script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml tests; fi
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs; fi
after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi

View File

@ -41,10 +41,6 @@
"SilverStripe\\Reports\\Tests\\": "tests/"
}
},
"scripts": {
"lint": "phpcs code/ tests/",
"lint-clean": "phpcbf code/ tests/"
},
"minimum-stability": "dev",
"prefer-stable": true
}

View File

@ -2,6 +2,9 @@
<ruleset name="SilverStripe">
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
<file>code</file>
<file>tests</file>
<!-- base rules are PSR-2 -->
<rule ref="PSR2" >
<!-- Current exclusions -->
@ -19,4 +22,3 @@
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
</rule>
</ruleset>