diff mx/commands.py @ 7533:29b0768b7ba6

added eclipseformat to the gate
author Doug Simon <doug.simon@oracle.com>
date Wed, 23 Jan 2013 16:49:55 +0100
parents 442668d41bc2
children a200d10867f1
line wrap: on
line diff
--- a/mx/commands.py	Wed Jan 23 16:42:13 2013 +0100
+++ b/mx/commands.py	Wed Jan 23 16:49:55 2013 +0100
@@ -775,6 +775,13 @@
         clean(cleanArgs)
         tasks.append(t.stop())
 
+        eclipse_exe = os.environ.get('ECLIPSE_EXE')
+        if eclipse_exe is not None:
+            t = Task('CodeFormatCheck')
+            if mx.eclipseformat(['-e', eclipse_exe]) != 0:
+                t.abort('Formatter modified files - run "mx eclipseformat", check in changes and repush')
+            tasks.append(t.stop())
+        
         t = Task('BuildJava')
         build(['--no-native'])
         tasks.append(t.stop())