2017-11-18 21:58:26 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<project name="PHPStan PHPDoc Parser" default="check">
|
|
|
|
|
|
|
|
<target name="check" depends="
|
|
|
|
composer-validate,
|
|
|
|
composer-install,
|
|
|
|
lint,
|
|
|
|
cs,
|
2017-11-20 08:05:03 +01:00
|
|
|
tests,
|
|
|
|
phpstan
|
2017-11-18 21:58:26 +01:00
|
|
|
"/>
|
|
|
|
|
|
|
|
<target name="composer-validate">
|
|
|
|
<exec
|
|
|
|
executable="composer"
|
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
|
|
|
<arg value="validate"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="composer-install">
|
|
|
|
<exec
|
|
|
|
executable="composer"
|
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
|
|
|
<arg value="install"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2020-12-12 16:30:17 +01:00
|
|
|
<target name="lint">
|
2019-12-20 13:25:14 +01:00
|
|
|
<exec
|
2020-12-12 16:30:17 +01:00
|
|
|
executable="vendor/bin/parallel-lint"
|
2019-12-20 13:25:14 +01:00
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
2020-12-12 16:30:17 +01:00
|
|
|
<arg value="--exclude"/>
|
|
|
|
<arg path="tests/PHPStan/Analyser/data"/>
|
|
|
|
<arg value="--exclude"/>
|
|
|
|
<arg path="tests/PHPStan/Rules/Methods/data"/>
|
|
|
|
<arg value="--exclude"/>
|
|
|
|
<arg path="tests/PHPStan/Rules/Functions/data"/>
|
|
|
|
<arg path="src" />
|
|
|
|
<arg path="tests" />
|
2019-12-20 13:25:14 +01:00
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2020-12-12 16:30:17 +01:00
|
|
|
<target name="cs">
|
2019-12-20 13:25:14 +01:00
|
|
|
<exec
|
|
|
|
executable="composer"
|
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
2020-12-12 16:30:17 +01:00
|
|
|
<arg value="install"/>
|
|
|
|
<arg value="--working-dir"/>
|
|
|
|
<arg path="build-cs"/>
|
2019-12-20 13:25:14 +01:00
|
|
|
<arg value="--ansi"/>
|
|
|
|
</exec>
|
2017-11-18 21:58:26 +01:00
|
|
|
<exec
|
2020-12-12 16:30:17 +01:00
|
|
|
executable="build-cs/vendor/bin/phpcs"
|
2017-11-18 21:58:26 +01:00
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
2020-12-12 16:30:17 +01:00
|
|
|
<arg value="--extensions=php"/>
|
|
|
|
<arg value="--encoding=utf-8"/>
|
|
|
|
<arg value="--tab-width=4"/>
|
|
|
|
<arg value="--ignore=tests/*/data,tests/*/traits"/>
|
|
|
|
<arg value="-sp"/>
|
|
|
|
<arg path="src"/>
|
|
|
|
<arg path="tests"/>
|
2017-11-18 21:58:26 +01:00
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="cs-fix">
|
|
|
|
<exec
|
2020-12-12 16:30:17 +01:00
|
|
|
executable="build-cs/vendor/bin/phpcbf"
|
2017-11-18 21:58:26 +01:00
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
|
|
|
<arg value="--extensions=php"/>
|
|
|
|
<arg value="--encoding=utf-8"/>
|
|
|
|
<arg value="--tab-width=4"/>
|
|
|
|
<arg value="--ignore=tests/*/data,tests/*/traits"/>
|
|
|
|
<arg value="-sp"/>
|
|
|
|
<arg path="src"/>
|
|
|
|
<arg path="tests"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2018-04-12 16:16:58 +02:00
|
|
|
<target name="tests" depends="build-abnfgen">
|
2017-11-18 21:58:26 +01:00
|
|
|
<exec
|
|
|
|
executable="vendor/bin/phpunit"
|
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
|
|
|
<arg value="-c"/>
|
|
|
|
<arg value="tests/phpunit.xml"/>
|
|
|
|
<arg path="tests"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
2017-11-20 08:05:03 +01:00
|
|
|
|
|
|
|
<target name="phpstan">
|
|
|
|
<exec
|
|
|
|
executable="vendor/bin/phpstan"
|
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
|
|
|
<arg value="analyse"/>
|
|
|
|
<arg value="--level"/>
|
2019-07-16 13:14:05 +02:00
|
|
|
<arg value="5"/>
|
2017-11-20 08:05:03 +01:00
|
|
|
<arg path="src"/>
|
|
|
|
<arg path="tests"/>
|
|
|
|
</exec>
|
|
|
|
</target>
|
2018-04-12 16:16:58 +02:00
|
|
|
|
|
|
|
<target name="build-abnfgen">
|
|
|
|
<exec
|
|
|
|
executable="./build-abnfgen.sh"
|
|
|
|
logoutput="true"
|
|
|
|
passthru="true"
|
|
|
|
checkreturn="true"
|
|
|
|
>
|
|
|
|
</exec>
|
|
|
|
</target>
|
2017-11-18 21:58:26 +01:00
|
|
|
</project>
|