mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-20 12:05:10 +00:00
Run Code Sniffer via phing.
This commit is contained in:
parent
8c9b7083d8
commit
4a064a0506
@ -21,8 +21,7 @@ before_script:
|
|||||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then travis/setup-composer.sh; fi"
|
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then travis/setup-composer.sh; fi"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phpcs -s --extensions=php --standard=build/code-sniffer-ruleset.xml phpseclib/; fi"
|
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phing -f build/build.xml sniff; fi"
|
||||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phpcs -s --extensions=php --standard=build/code-sniffer-ruleset-tests.xml tests/; fi"
|
|
||||||
- travis/run-phpunit.sh
|
- travis/run-phpunit.sh
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
|
26
build/build.xml
Normal file
26
build/build.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="phpseclib"
|
||||||
|
description="PHP Secure Communications Library"
|
||||||
|
default="all"
|
||||||
|
>
|
||||||
|
|
||||||
|
<target name="all" depends="sniff" />
|
||||||
|
|
||||||
|
<!-- Code Sniffer -->
|
||||||
|
<target name="sniff" depends="sniff-php-code,sniff-php-tests" />
|
||||||
|
<target name="sniff-php-code">
|
||||||
|
<exec command="vendor/bin/phpcs -s
|
||||||
|
--extensions=php
|
||||||
|
--standard=build/code-sniffer-ruleset.xml
|
||||||
|
phpseclib/"
|
||||||
|
dir=".." passthru="true" />
|
||||||
|
</target>
|
||||||
|
<target name="sniff-php-tests">
|
||||||
|
<exec command="vendor/bin/phpcs -s
|
||||||
|
--extensions=php
|
||||||
|
--standard=build/code-sniffer-ruleset-tests.xml
|
||||||
|
tests/"
|
||||||
|
dir=".." passthru="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
Loading…
Reference in New Issue
Block a user