-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
52 lines (48 loc) · 1.8 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<project name="ranyuen/little" default="main">
<target name="main">
<phingcall target="build"/>
<phingcall target="test"/>
</target>
<target name="test">
<!-- PHP lint -->
<apply executable="php" checkreturn="true">
<arg value="-l"/>
<fileset dir=".">
<include name="src/**/*.php"/>
<include name="tests/**/*.php"/>
</fileset>
</apply>
<!-- PHP-CS-Fixer -->
<foreach list="src/, tests/" param="dir" target="test-cs-fixer"/>
<!-- PHP Mess Detector -->
<exec executable="vendor/bin/phpmd" passthru="true" checkreturn="true">
<arg value="src/"/>
<arg value="text"/>
<arg value="phpmd.xml"/>
</exec>
<!-- PHP_CodeSniffer -->
<exec executable="vendor/bin/phpcbf" passthru="true">
<arg value="--standard=phpcs.xml"/>
<arg value="--extensions=php"/>
<arg value="src/"/>
</exec>
<exec executable="vendor/bin/phpcs" passthru="true" checkreturn="true">
<arg value="--standard=phpcs.xml"/>
<arg value="--extensions=php"/>
<arg value="src/"/>
</exec>
<!-- PHPUnit -->
<exec command="vendor/bin/phpunit" passthru="true" checkreturn="true"/>
</target>
<target name="test-cs-fixer">
<exec executable="vendor/bin/php-cs-fixer" passthru="true">
<arg value="fix"/>
<arg value="${dir}"/>
</exec>
</target>
<target name="build" depends="build-peg"/>
<target name="build-peg">
<exec command="php vendor/hafriedlander/php-peg/cli.php src/PathCompiler.peg.inc > res/PathCompiler.php" passthru="true"/>
</target>
</project>