1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-22 21:40:54 +01:00

arc lint: fix/enable PEP8 linter

Summary:
This diff:
- Adds the PEP8 linter to the externals directory
- Changes the path for finding pep8.py
- Removes use of execx since pep8.py return an errors code
  when it finds PEP8 violations

Test Plan:
tested linting python code

Reviewed By: epriestley
Reviewers: epriestley, jungejason
CC: aran, epriestley
Differential Revision: 309
This commit is contained in:
Andrew Gallagher 2011-05-18 16:04:06 -07:00
parent 10bdc77f96
commit 399c505f1a
2 changed files with 1363 additions and 2 deletions

1360
externals/pep8/pep8.py vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -45,11 +45,12 @@ class ArcanistPEP8Linter extends ArcanistLinter {
}
public function lintPath($path) {
$pep8_bin = phutil_get_library_root('arcanist').'/externals/pep8/pep8.py';
$pep8_bin = phutil_get_library_root('arcanist').
'/../externals/pep8/pep8.py';
$options = $this->getPEP8Options();
list($stdout) = execx(
list($rc, $stdout) = exec_manual(
"/usr/bin/env python2.6 %s {$options} %s",
$pep8_bin,
$this->getEngine()->getFilePathOnDisk($path));