-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
46 lines (39 loc) · 1.77 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="cluebotng" default="validate" description="ClueBot NG">
<autoloader autoloaderpath="vendor/autoload.php"/>
<autoloader autoloaderpath="vendor/squizlabs/php_codesniffer/autoload.php"/>
<fileset dir="${phing.dir}" id="src.fileset.php">
<include name="*.php"/>
<include name="**/*.php"/>
<exclude name="vendor/**"/>
</fileset>
<target name="validate" depends="phplint,phpcs,phpmd,phpcpd" description="Running code validation targets"/>
<target name="composer-install" description="Install Dependencies via Composer">
<echo>Installing Composer dependencies.</echo>
<exec command="./composer.phar install --optimize-autoloader" dir="${phing.dir}" logoutput="true" checkreturn="true"/>
</target>
<target name="phplint" description="Lint all source php files.">
<echo>Linting php code for syntax errors.</echo>
<phplint haltonfailure="true">
<fileset refid="src.fileset.php"/>
</phplint>
</target>
<target name="phpcs" description="PHP_CodeSniffer using PSR-2 code standard.">
<echo>Running PHP_CodeSniffer using PSR1/PSR2 standards.</echo>
<phpcodesniffer standard="PSR2" haltonerror="false" haltonwarning="false">
<fileset refid="src.fileset.php"/>
</phpcodesniffer>
</target>
<target name="phpmd" description="PHP Mess Detector.">
<echo>Running PHP Mess Detector.</echo>
<phpmd>
<fileset refid="src.fileset.php"/>
</phpmd>
</target>
<target name="phpcpd" description="PHP Copy Paste Detector.">
<echo>Running PHP Copy Paste Detector.</echo>
<phpcpd>
<fileset refid="src.fileset.php"/>
</phpcpd>
</target>
</project>