Submodule Joomla Coding Standards, add build script to check them

This commit is contained in:
Michael Babker 2013-07-12 20:46:47 -05:00
parent 0519aceb95
commit 8ff29492fe
4 changed files with 38 additions and 0 deletions

3
.gitignore vendored
View File

@ -7,6 +7,9 @@ build/packages
build/packaging
build/releases
# Build #
build/logs
# IDE & System#
.buildpath
.project

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "build/phpcs/Joomla"]
path = build/phpcs/Joomla
url = git://github.com/joomla/coding-standards.git

31
build.xml Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="patchtester" default="build" basedir=".">
<!-- Run all tasks using build target -->
<target name="build" depends="phpcs" />
<!-- Check code style using Joomla Coding Standards -->
<target name="phpcs" description="Generate codestyle report using PHP_CodeSniffer">
<exec executable="phpcs">
<arg value="--report=checkstyle" />
<arg value="--extensions=php" />
<arg value="-p" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
<arg value="--ignore=${basedir}/*tmpl/*" />
<arg path="${basedir}/administrator/components/com_patchtester" />
</exec>
</target>
<!-- Check code style on Travis-CI based on Joomla Platform -->
<target name="travis-phpcs" description="Generate codestyle report using PHP_CodeSniffer for output on Travis-CI">
<exec executable="phpcs">
<arg value="-p" />
<arg value="-w" />
<arg value="--extensions=php" />
<arg value="--report=full" />
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
<arg value="--ignore=${basedir}/*tmpl/*" />
<arg path="${basedir}/administrator/components/com_patchtester" />
</exec>
</target>
</project>

1
build/phpcs/Joomla Submodule

@ -0,0 +1 @@
Subproject commit 4281a0ec5eacfc350285348bfd8edca08be913c6