# HG changeset patch # User Doug Simon # Date 1378405400 -7200 # Node ID 2d759e68c8ca63eb9976b24c5062d37d3474f84f # Parent 86830ed062be6d6464d1c0701dc963b37142a285 pylint only checks versioned python sources diff -r 86830ed062be -r 2d759e68c8ca mx/commands.py --- 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"""