Browse Source

Add Ant script lint checker; be double sure there are no silly syntax errors

Gerard Roche 11 years ago
parent
commit
620c1fd8a0
2 changed files with 37 additions and 0 deletions
  1. 1 0
      php-zend-framework1/.gitignore
  2. 36 0
      php-zend-framework1/lint.xml

+ 1 - 0
php-zend-framework1/.gitignore

@@ -5,3 +5,4 @@
 /tags
 /tags
 .idea
 .idea
 composer.lock
 composer.lock
+cache.properties

+ 36 - 0
php-zend-framework1/lint.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project basedir="." default="lint">
+
+    <property name="src.dir" location="" />
+
+    <target name="lint" description="Run php syntax check (lint)">
+        <apply executable="php" failonerror="true">
+            <arg value="-l" />
+            <fileset dir="${src.dir}">
+
+                <include name="**/*.php" />
+                <include name="**/*.phtml" />
+
+                <!--
+
+                Zend Framework shouldn't have any syntax errors, but let's just
+                be double sure.
+
+                Excluding tests and other non-runtime stuff
+
+                -->
+                <exclude name="**/vendor/zendframework/zendframework1/bin/**" />
+                <exclude name="**/vendor/zendframework/zendframework1/demos/**" />
+                <exclude name="**/vendor/zendframework/zendframework1/documentation/**" />
+                <exclude name="**/vendor/zendframework/zendframework1/puppet/**" />
+                <exclude name="**/vendor/zendframework/zendframework1/resources/**" />
+                <exclude name="**/vendor/zendframework/zendframework1/tests/**" />
+
+                <!-- cache -->
+                <modified />
+
+            </fileset>
+        </apply>
+    </target>
+
+</project>