mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-11 08:39:45 +01:00
157 lines
3.1 KiB
XML
157 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<project name="PHPStan PHPDoc Parser" default="check">
|
|
|
|
<target name="check" depends="
|
|
composer-validate,
|
|
composer-install,
|
|
lint,
|
|
cs,
|
|
composer-normalize-check,
|
|
tests,
|
|
phpstan
|
|
"/>
|
|
|
|
<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>
|
|
|
|
<target name="composer-normalize-check">
|
|
<exec
|
|
executable="composer"
|
|
logoutput="true"
|
|
passthru="true"
|
|
checkreturn="true"
|
|
>
|
|
<arg value="normalize"/>
|
|
<arg value="--ansi"/>
|
|
<arg value="--dry-run"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="composer-normalize-fix">
|
|
<exec
|
|
executable="composer"
|
|
logoutput="true"
|
|
passthru="true"
|
|
checkreturn="true"
|
|
>
|
|
<arg value="normalize"/>
|
|
<arg value="--ansi"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="lint">
|
|
<exec
|
|
executable="vendor/bin/parallel-lint"
|
|
logoutput="true"
|
|
passthru="true"
|
|
checkreturn="true"
|
|
>
|
|
<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" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="cs">
|
|
<php expression="PHP_VERSION_ID >= 70400 ?'true':'false'" returnProperty="isPHP74" level="verbose" />
|
|
<if>
|
|
<equals arg1="${isPHP74}" arg2="false" />
|
|
<then>
|
|
<exec
|
|
executable="vendor/bin/phpcs"
|
|
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>
|
|
</then>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="cs-fix">
|
|
<exec
|
|
executable="vendor/bin/phpcbf"
|
|
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>
|
|
|
|
<target name="tests" depends="build-abnfgen">
|
|
<exec
|
|
executable="vendor/bin/phpunit"
|
|
logoutput="true"
|
|
passthru="true"
|
|
checkreturn="true"
|
|
>
|
|
<arg value="-c"/>
|
|
<arg value="tests/phpunit.xml"/>
|
|
<arg path="tests"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="phpstan">
|
|
<exec
|
|
executable="vendor/bin/phpstan"
|
|
logoutput="true"
|
|
passthru="true"
|
|
checkreturn="true"
|
|
>
|
|
<arg value="analyse"/>
|
|
<arg value="--level"/>
|
|
<arg value="5"/>
|
|
<arg path="src"/>
|
|
<arg path="tests"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="build-abnfgen">
|
|
<exec
|
|
executable="./build-abnfgen.sh"
|
|
logoutput="true"
|
|
passthru="true"
|
|
checkreturn="true"
|
|
>
|
|
</exec>
|
|
</target>
|
|
</project>
|