Skip to content

Commit 8ff2949

Browse files
author
Michael Babker
committed
Submodule Joomla Coding Standards, add build script to check them
1 parent 0519ace commit 8ff2949

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ build/packages
77
build/packaging
88
build/releases
99

10+
# Build #
11+
build/logs
12+
1013
# IDE & System#
1114
.buildpath
1215
.project

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "build/phpcs/Joomla"]
2+
path = build/phpcs/Joomla
3+
url = git://github.com/joomla/coding-standards.git

build.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="patchtester" default="build" basedir=".">
3+
<!-- Run all tasks using build target -->
4+
<target name="build" depends="phpcs" />
5+
6+
<!-- Check code style using Joomla Coding Standards -->
7+
<target name="phpcs" description="Generate codestyle report using PHP_CodeSniffer">
8+
<exec executable="phpcs">
9+
<arg value="--report=checkstyle" />
10+
<arg value="--extensions=php" />
11+
<arg value="-p" />
12+
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
13+
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
14+
<arg value="--ignore=${basedir}/*tmpl/*" />
15+
<arg path="${basedir}/administrator/components/com_patchtester" />
16+
</exec>
17+
</target>
18+
19+
<!-- Check code style on Travis-CI based on Joomla Platform -->
20+
<target name="travis-phpcs" description="Generate codestyle report using PHP_CodeSniffer for output on Travis-CI">
21+
<exec executable="phpcs">
22+
<arg value="-p" />
23+
<arg value="-w" />
24+
<arg value="--extensions=php" />
25+
<arg value="--report=full" />
26+
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
27+
<arg value="--ignore=${basedir}/*tmpl/*" />
28+
<arg path="${basedir}/administrator/components/com_patchtester" />
29+
</exec>
30+
</target>
31+
</project>

build/phpcs/Joomla

Submodule Joomla added at 4281a0e

0 commit comments

Comments
 (0)