Phing > update configuration

This commit is contained in:
Meritoo
2018-10-25 10:59:24 +02:00
parent 61676a445e
commit ff416fda69

View File

@@ -30,8 +30,6 @@
<!-- Default / main target --> <!-- Default / main target -->
<target name="build:main" <target name="build:main"
depends="build:fix-coding-standards, depends="build:fix-coding-standards,
build:clean,
build:prepare,
build:check, build:check,
build:test, build:test,
app:checkout" app:checkout"
@@ -57,20 +55,8 @@
test:infection" test:infection"
/> />
<!-- Project build clean -->
<target name="build:clean">
<delete dir="${dir.reports}"/>
</target>
<!-- Project build prepare -->
<target name="build:prepare">
<mkdir dir="${dir.reports}"/>
<mkdir dir="${dir.reports.pdepend}"/>
<mkdir dir="${dir.reports.coverage}"/>
</target>
<!-- Symfony2 code sniffer --> <!-- Symfony2 code sniffer -->
<target name="check:cs"> <target name="check:cs" depends="build:prepare">
<phpcodesniffer standard="PSR2" showWarnings="true"> <phpcodesniffer standard="PSR2" showWarnings="true">
<fileset refid="sourcecode"/> <fileset refid="sourcecode"/>
<formatter type="checkstyle" outfile="${dir.reports}/checkstyle.xml"/> <formatter type="checkstyle" outfile="${dir.reports}/checkstyle.xml"/>
@@ -80,7 +66,7 @@
</target> </target>
<!-- copy/paste detector --> <!-- copy/paste detector -->
<target name="check:cpd"> <target name="check:cpd" depends="build:prepare">
<phpcpd> <phpcpd>
<fileset refid="sourcecode"/> <fileset refid="sourcecode"/>
<formatter type="pmd" outfile="${dir.reports}/pmd-cpd.xml"/> <formatter type="pmd" outfile="${dir.reports}/pmd-cpd.xml"/>
@@ -88,7 +74,7 @@
</target> </target>
<!-- Mess detector --> <!-- Mess detector -->
<target name="check:md"> <target name="check:md" depends="build:prepare">
<phpmd rulesets="codesize,controversial,design,naming,unusedcode"> <phpmd rulesets="codesize,controversial,design,naming,unusedcode">
<fileset refid="sourcecode"/> <fileset refid="sourcecode"/>
<formatter type="html" outfile="${dir.reports}/phpmd.html"/> <formatter type="html" outfile="${dir.reports}/phpmd.html"/>
@@ -97,7 +83,7 @@
</target> </target>
<!-- Code dependency --> <!-- Code dependency -->
<target name="check:depend"> <target name="check:depend" depends="build:prepare">
<phpdepend> <phpdepend>
<fileset refid="sourcecode"/> <fileset refid="sourcecode"/>
<logger type="jdepend-xml" outfile="${dir.reports.pdepend}/jdepend.xml"/> <logger type="jdepend-xml" outfile="${dir.reports.pdepend}/jdepend.xml"/>
@@ -107,22 +93,39 @@
</target> </target>
<!-- Measure the size and analyzing the structure of a project --> <!-- Measure the size and analyzing the structure of a project -->
<target name="check:loc"> <target name="check:loc" depends="build:prepare">
<phploc reportType="txt" reportName="phploc" reportDirectory="${dir.reports}"> <phploc reportType="txt" reportName="phploc" reportDirectory="${dir.reports}">
<fileset refid="sourcecode"/> <fileset refid="sourcecode"/>
</phploc> </phploc>
</target> </target>
<!-- PHPUnit tests --> <!-- PHPUnit tests -->
<target name="test:phpunit"> <target name="test:phpunit" depends="build:prepare">
<exec command="${tests.phpunit.command}" passthru="true"/> <exec command="${tests.phpunit.command}" passthru="true"/>
</target> </target>
<!-- Run mutation testing --> <!-- Run mutation testing -->
<target name="test:infection"> <target name="test:infection" depends="build:prepare">
<exec command="${tests.mutation.command}" passthru="true"/> <exec command="${tests.mutation.command}" passthru="true"/>
</target> </target>
<!-- Project build clean -->
<target name="build:clean">
<if>
<available file="${dir.reports}" type="dir" property="dir_is_available"/>
<then>
<delete dir="${dir.reports}"/>
</then>
</if>
</target>
<!-- Project build prepare -->
<target name="build:prepare" depends="build:clean">
<mkdir dir="${dir.reports}"/>
<mkdir dir="${dir.reports.pdepend}"/>
<mkdir dir="${dir.reports.coverage}"/>
</target>
<!-- Checkout and finalization --> <!-- Checkout and finalization -->
<target name="app:checkout"> <target name="app:checkout">
<tstamp> <tstamp>