forked from DragonBe/phpqa-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
53 lines (44 loc) · 2.01 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="PHPQA Workshop" default="build">
<fileset dir="${project.basedir}" id="files">
<include name="${project.basedir}/exercise/**"/>
</fileset>
<target name="php-lint" description="Run syntax checking on the codebase">
<phplint>
<fileset refid="files"/>
</phplint>
</target>
<target name="php-doc" description="Generate automated documentation">
<exec
command="./vendor/bin/phpdoc run -d exercise/ -t build/phpdoc/"
dir="${project.basedir}"/>
</target>
<target name="php-depend" description="Calculating dependency metrics">
<exec
command="./vendor/bin/pdepend --jdepend-xml=./build/logs/jdepend.xml --summary-xml=./build/logs/summary.xml --jdepend-chart=./build/graphs/jdepend.svg --overview-pyramid=./build/graphs/pyramid.svg exercise/"
dir="${project.basedir}"/>
</target>
<target name="php-md" description="Mess detection">
<exec
command="./vendor/bin/phpmd exercise/ xml cleancode,codesize,controversial,design,naming,unusedcode --reportfile ./build/logs/pmd.xml"
dir="${project.basedir}"/>
</target>
<target name="php-cpd" description="Copy/Paste detection">
<exec
command="./vendor/bin/phpcpd --min-lines=2 --min-tokens=10 --fuzzy --log-pmd=./build/logs/pmd-cpd.xml exercise/"
dir="${project.basedir}"/>
</target>
<target name="php-cs" description="PHP CodeSniffer">
<exec
command="./vendor/bin/phpcs --standard=PSR2 --report=checkstyle --report-file=./build/logs/checkstyle.xml exercise/"
dir="${project.basedir}"/>
</target>
<target name="build" description="The build process">
<phingcall target="php-lint"/>
<phingcall target="php-doc"/>
<phingcall target="php-depend"/>
<phingcall target="php-md"/>
<phingcall target="php-cpd"/>
<phingcall target="php-cs"/>
</target>
</project>