-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
46 lines (38 loc) · 1.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="polderknowledge/coding-standards" default="build" basedir=".">
<property name="bindir" value="${project.basedir}/vendor/bin" override="true" />
<property name="builddir" value="${project.basedir}/build" override="true" />
<property name="fileset" value="source" override="true"/>
<property name="testdir" value="${project.basedir}/tests" override="true" />
<fileset id="source" dir="${project.basedir}/PolderKnowledge/Sniffs">
<include name="**/*.php" />
</fileset>
<target name="clean">
<delete dir="${builddir}" includeemptydirs="true" verbose="true" failonerror="false" />
</target>
<target name="prepare">
<mkdir dir="${builddir}" />
</target>
<target name="build" depends="prepare, checksyntax, checkstyle, test" />
<target name="checksyntax" depends="prepare">
<phplint>
<fileset dir="${project.basedir}">
<include name="PolderKnowledge/**/*.php" />
<exclude name="**/vendor/**" />
</fileset>
</phplint>
</target>
<target name="checkstyle" depends="prepare">
<phpcodesniffer
standard="${project.basedir}/ruleset.xml"
format="summary"
skipversioncheck="true">
<fileset refid="${fileset}" />
<formatter type="full" usefile="false"/>
<formatter type="checkstyle" outfile="${builddir}/checkstyle-codesniffer.xml"/>
</phpcodesniffer>
</target>
<target name="test" depends="prepare">
<exec command="${project.basedir}/vendor/bin/phpunit" passthru="true" level="info" checkreturn="true"/>
</target>
</project>