def execute(self, args=None): def jslint(file): tmpFile = join(alePath('tmp'), os.path.split(file)[1] + '_tmp') command = 'java -classpath %s org.mozilla.javascript.tools.shell.Main %s %s' % (finalRhinoJsJar, finalJslintPath, file) logging.info('Jslint checking %s' % file) return os.system(command) return recurse(jslint, 'js', *args)
def execute(self, args=None): def tidy(file): tmpFile = join(alePath('tmp'), os.path.split(file)[1] + '_tmp') command = finalTidyPath + ' ' + file + ' ' + tmpFile logging.info('Tidying %s' % file) returnCode = os.system(command) if returnCode == 0: shutil.move(tmpFile, file) return returnCode return recurse(tidy, 'py', *args)
def execute(self, args=None): command = join(pep8root, "pep8.py") allSuccess = True def check(file): # print 'Checking %s' % file commandWithArgs = [command, "--show-source", "--statistics", "--count", "--show-pep8", file] p = Popen(commandWithArgs, env={"PYTHONPATH": pep8root}) sts = os.waitpid(p.pid, 0)[1] return sts return recurse(check, "py", *args)
def execute(self, args=None): pyflakesroot = join(join(join(alePath('recipes_installed'), 'pyflakes'), 'pkgs'), 'pyflakes-0.3.0') command = join(pyflakesroot, 'bin/pyflakes') allSuccess = True def check(file): p = Popen([command, file], env={'PYTHONPATH': pyflakesroot}) # todo: just yield a generator or get all .py files sts = os.waitpid(p.pid, 0)[1] return sts return recurse(check, 'py', *args)