getPEP8Options(); list($rc, $stdout) = exec_manual( "/usr/bin/env python2.6 %s {$options} %s", $pep8_bin, $this->getEngine()->getFilePathOnDisk($path)); $lines = explode("\n", $stdout); $messages = array(); foreach ($lines as $line) { $matches = null; if (!preg_match('/^(.*?):(\d+):(\d+): (\S+) (.*)$/', $line, $matches)) { continue; } foreach ($matches as $key => $match) { $matches[$key] = trim($match); } $message = new ArcanistLintMessage(); $message->setPath($path); $message->setLine($matches[2]); $message->setChar($matches[3]); $message->setCode($matches[4]); $message->setName('PEP8 '.$matches[4]); $message->setDescription($matches[5]); if ($matches[4][0] == 'E') { $message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR); } else { $message->setSeveirty(ArcanistLintSeverity::SEVERITY_WARNING); } $this->addLintMessage($message); } } }