You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/11/25 07:59:22 UTC

[12/18] git commit: [flex-asjs] [refs/heads/develop] - add linting to build script

add linting to build script


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d3cec262
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d3cec262
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d3cec262

Branch: refs/heads/develop
Commit: d3cec262364117cea6091426aebd00bb2f8d4d18
Parents: ba9331a
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 22 13:56:09 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 22 13:56:09 2013 -0800

----------------------------------------------------------------------
 frameworks/js/build.xml         | 21 +++++++++++++++++++++
 frameworks/js/jshint.properties | 12 ++++++++++++
 2 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d3cec262/frameworks/js/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/build.xml b/frameworks/js/build.xml
index ceb45f2..2cbf1a7 100644
--- a/frameworks/js/build.xml
+++ b/frameworks/js/build.xml
@@ -74,6 +74,27 @@
     </target>
     
     <target name="compile" description="Validates JS code">
+        <echo>running gjslint</echo>
+        <exec executable="gjslint" dir="${basedir}" failonerror="true">
+            <arg value="--strict" />
+            <arg value="--disable" />
+            <arg value="006,100,214,300" />
+            <!-- 006: wrong indentation -->
+            <!-- 100: cannot have non-primitive value -->
+            <!-- 214: @fileoverview tag missing description -->
+            <!-- 300: missing newline at end of file -->
+            <arg value="--max_line_length" />
+            <arg value="120" />
+            <arg value="-r" />
+            <arg value="FlexJS/src" />
+        </exec>
+        <echo>running jshint</echo>
+        <echo>set failonerror=true when we get this cleaned up</echo>
+        <exec executable="jshint" dir="${basedir}" failonerror="false">
+            <arg value="--config" />
+            <arg value="jshint.properties" />
+            <arg value="FlexJS/src" />
+        </exec>
     </target>
 	   
     <!--

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d3cec262/frameworks/js/jshint.properties
----------------------------------------------------------------------
diff --git a/frameworks/js/jshint.properties b/frameworks/js/jshint.properties
new file mode 100644
index 0000000..0a5920b
--- /dev/null
+++ b/frameworks/js/jshint.properties
@@ -0,0 +1,12 @@
+{
+    "curly": false,
+    "eqeqeq": false,
+    "eqnull": true,
+    "globalstrict": true,
+    "indent": 2,
+    "maxlen": 120,
+    "onevar": false,
+    "strict": false,
+    "white": false,
+    "globals": { "goog" : false, "org" : false }
+}
\ No newline at end of file