forked from Islandora/islandora_xacml_editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
64 lines (53 loc) · 2.24 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="islandora_xacml_editor" default="build">
<target name="build" depends="clean,prepare,lint,phploc,code_sniff,phpcpd,test" />
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build" />
</target>
<target name="prepare" description="Prepares workspace for artifacts" >
<mkdir dir="${basedir}/build" />
<mkdir dir="${basedir}/build/test" />
<mkdir dir="${basedir}/build/logs" />
</target>
<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
<include name="**/*.inc" />
<include name="**/*.module" />
<include name="**/*.install" />
<include name="**/*.test" />
<modified />
</fileset>
<fileset dir="${basedir}/api">
<include name="**/*.php" />
<include name="**/*.inc" />
<include name="**/*.module" />
<include name="**/*.install" />
<include name="**/*.test" />
<modified />
</fileset>
</apply>
</target>
<target name="phploc" description="Measure project size using PHPLOC">
<exec executable="phploc">
<arg line="--log-csv ${basedir}/build/logs/phploc.csv --exclude build --exclude css --names *.php,*.module,*.inc,*.test ${basedir}" />
</exec>
</target>
<target name="code_sniff" description="Checks the code for Drupal coding standard violations" >
<exec executable="phpcs">
<arg line="--standard=Drupal --report=checkstyle --report-file=${basedir}/build/logs/checkstyle.xml --extensions=php,inc,test,module,install --ignore=build/,css/ ${basedir} ${basedir}/api" />
</exec>
</target>
<target name="phpcpd" description="Copy/Paste code detection">
<exec executable="phpcpd">
<arg line="--log-pmd ${basedir}/build/logs/pmd-cpd.xml --exclude build --exclude css --names *.php,*.module,*.inc,*.test ${basedir}" />
</exec>
</target>
<target name="test">
<exec executable="drush">
<arg line="test-cc --xml=${basedir}/build/test islandora_xacml_editor ${basedir}/build/logs/clover.xml" />
</exec>
</target>
</project>