Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

^ [#28600] Add a code style checker. Thanks Rouven

  • Loading branch information...
commit 051783529d387cd6b3952d4d96ab2177fc8a6d61 1 parent 772e227
@realityking realityking authored infograf768 committed
View
23 build.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="joomla" default="build" basedir=".">
+ <property name="source" value="." />
+
+ <target name="clean" description="Clean up and create artifact directories">
+ <delete dir="${basedir}/build/logs" />
+
+ <mkdir dir="${basedir}/build/logs" />
+ </target>
+
+ <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
+ <exec executable="phpcs">
+ <arg value="--report=checkstyle" />
+ <arg value="-p" />
+ <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
+ <arg value="--standard=${basedir}/build/phpcs/Joomla" />
+ <arg path="${source}" />
+ </exec>
+ </target>
+
+ <target name="build" depends="clean,phpcs" />
+</project>
View
1  build/phpcs/Joomla/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>
View
48 build/phpcs/Joomla/ruleset.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<ruleset name="Joomla">
+ <description>The Joomla coding standard.</description>
+
+ <!-- Exclude all JavaScript and CSS files. There are bugs and we don't have any rules anyways. -->
+ <exclude-pattern>*.js</exclude-pattern>
+ <exclude-pattern>*.css</exclude-pattern>
+
+ <!-- Exclude the index.html files. -->
+ <exclude-pattern>*/index.html</exclude-pattern>
+
+ <!-- Exclude folders not containing production code -->
+ <exclude-pattern>*/build/*</exclude-pattern>
+ <exclude-pattern>*/docs/*</exclude-pattern>
+ <exclude-pattern>*/tests/*</exclude-pattern>
+ <exclude-pattern>*/cache/*</exclude-pattern>
+ <exclude-pattern>*/tmp/*</exclude-pattern>
+
+ <!-- Exclude 3rd party libraries. -->
+ <exclude-pattern>*/phputf8/*</exclude-pattern>
+ <exclude-pattern>*/simplepie/*</exclude-pattern>
+ <exclude-pattern>*/phpmailer/phpmailer.php</exclude-pattern>
+ <exclude-pattern>*/phpmailer/smtp.php</exclude-pattern>
+ <exclude-pattern>*/phpmailer/pop3.php</exclude-pattern>
+ <exclude-pattern>*/geshi/*</exclude-pattern>
+ <exclude-pattern>*/mootree*.css</exclude-pattern>
+ <exclude-pattern>*/mooRainbow.css</exclude-pattern>
+ <exclude-pattern>*/modal.css</exclude-pattern>
+
+ <!-- Include all sniffs in an external standard directory -->
+
+ <!-- Include some additional sniffs from the Generic standard -->
+
+ <rule ref="Generic.Files.LineEndings"/>
+
+ <rule ref="Generic.PHP.DisallowShortOpenTag"/>
+ <rule ref="Generic.PHP.DeprecatedFunctions"/>
+
+ <rule ref="Squiz.Scope.StaticThisUsage"/>
+
+ <!-- Use Unix newlines -->
+ <rule ref="Generic.Files.LineEndings">
+ <properties>
+ <property name="eolChar" value="\n"/>
+ </properties>
+ </rule>
+
+</ruleset>
View
1  build/phpcs/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><title></title>
View
1  installation/CHANGELOG
@@ -36,6 +36,7 @@ $ -> Language fix or change
# [#28285] E_NOTICE about array to string conversion in debug.php with PHP 5.4. Thanks Rouven
# [#28560] Backport some files completely from the current platform. Thanks Rouven
# [#28599] Backport the new JLoader from the platform 12.1. Thanks Rouven
+ ^ [#28600] Add a code style checker. Thanks Rouven
02-June-2012 Jean-Marie Simonet
# [#28375] Remove blacklist code from FinderIndexerHelper. Thanks Michael
Please sign in to comment.
Something went wrong with that request. Please try again.