changeset 11534:2d759e68c8ca

pylint only checks versioned python sources
author Doug Simon <doug.simon@oracle.com>
date Thu, 05 Sep 2013 20:23:20 +0200
parents 86830ed062be
children 8f0fb0ade839 9021f7761457
files mx/commands.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mx/commands.py	Thu Sep 05 20:20:30 2013 +0200
+++ b/mx/commands.py	Thu Sep 05 20:23:20 2013 +0200
@@ -467,12 +467,12 @@
     env = os.environ.copy()
     env['PYTHONPATH'] = dirname(mx.__file__)
 
-    for root, _, filenames in os.walk(_graal_home):
-        for f in filenames:
-            if f.endswith('.py'):
-                pyfile = join(_graal_home, root, f)
-                mx.log('Running pylint on ' + pyfile + '...')
-                mx.run(['pylint', '--reports=n', '--rcfile=' + rcfile, pyfile], env=env)
+    versioned = subprocess.check_output(['hg', 'locate', '-f'], stderr=subprocess.STDOUT).split(os.linesep)
+    for f in versioned:
+        if f.endswith('.py'):
+            pyfile = f
+            mx.log('Running pylint on ' + pyfile + '...')
+            mx.run(['pylint', '--reports=n', '--rcfile=' + rcfile, pyfile], env=env)
 
 def jdkhome(args, vm=None):
     """print the JDK directory selected for the 'vm' command"""