forked from Konafets/TYPO3SniffPool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
84 lines (72 loc) · 2.7 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?xml version="1.0" encoding="UTF-8"?>
<project name="TYPO3SniffPool" default="build">
<property name="php" value="php"/>
<target name="build" depends="lint,phpunit,phpcs_sniffs,phpcs_tests"/>
<target name="build-travis" depends="lint,phpcs_sniffs_travis,phpunit"/>
<target name="lint">
<apply executable="${php}" failonerror="true">
<arg value="-l"/>
<fileset dir="${basedir}/Sniffs">
<include name="**/*.php"/>
<modified/>
</fileset>
<fileset dir="${basedir}/Tests">
<include name="**/*.php"/>
<modified/>
</fileset>
</apply>
</target>
<target name="phpcs_sniffs">
<exec executable="phpcs">
<arg value="--standard=PHPCS"/>
<arg value="--extensions=php"/>
<arg value="--report=summary"/>
<arg value="--warning-severity=0"/>
<arg value="-npv"/>
<arg value="--ignore=*/Tests/"/>
<arg path="${basedir}/Sniffs"/>
</exec>
</target>
<target name="phpcs_sniffs_travis">
<exec executable="./vendor/squizlabs/php_codesniffer/scripts/phpcs">
<arg value="--standard=PHPCS"/>
<arg value="--extensions=php"/>
<arg value="--report=summary"/>
<arg value="--warning-severity=0"/>
<arg value="-np"/>
<arg value="--ignore=*/Tests/"/>
<arg path="${basedir}/Sniffs"/>
</exec>
</target>
<target name="phpcs_tests">
<exec executable="phpcs">
<arg value="--standard=PEAR"/>
<arg value="--extensions=php"/>
<arg value="--report=summary"/>
<arg value="--warning-severity=0"/>
<arg value="-np"/>
<arg path="${basedir}/Tests"/>
</exec>
</target>
<target name="phpcs_tests_travis">
<exec executable="./vendor/squizlabs/php_codesniffer/scripts/phpcs">
<arg value="--standard=PEAR"/>
<arg value="--extensions=php"/>
<arg value="--report=summary"/>
<arg value="--warning-severity=0"/>
<arg value="-np"/>
<arg path="${basedir}/Tests"/>
</exec>
</target>
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="phpunit" failonerror="true">
<arg value="./vendor/squizlabs/php_codesniffer/tests/AllTests.php"/>
</exec>
</target>
<target name="docs">
<exec executable="phpcs" output="documentation.html">
<arg value="--standard=TYPO3SniffPool"/>
<arg value="--generator=html"/>
</exec>
</target>
</project>