Skip to content

Commit

Permalink
Adding PHPCS to build
Browse files Browse the repository at this point in the history
  • Loading branch information
klaussilveira committed May 6, 2013
1 parent 9dbcc13 commit fb1d18c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="gitlist" default="build">
<target name="build" depends="prepare,lint,phploc,pdepend,phpmd,phpcpd,phpunit" />
<target name="build" depends="prepare,lint,phploc,pdepend,phpmd,phpcpd,phpunit,phpcs" />
<target name="build-package" depends="prepare-package,lint,phploc,package" />

<target name="clean" description="Clean build artifacts">
Expand Down Expand Up @@ -76,6 76,15 @@
<exec executable="phpunit" failonerror="true"/>
</target>

<target name="phpcs" description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
<exec executable="phpcs" output="/dev/null">
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=PSR2" />
<arg path="${basedir}/src" />
</exec>
</target>

<target name="package" description="Package the application for distribution">
<copy todir="${basedir}/build/gitlist/">
<fileset dir="${basedir}" excludes="build/**, tests/**, pkg_builder/**, phpunit.xml.dist, cache.properties, .gitignore, .travis.yml, build.xml, composer.json, composer.lock, config.ini" />
Expand Down

0 comments on commit fb1d18c

Please sign in to comment.