mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +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:
parent
10bdc77f96
commit
399c505f1a
2 changed files with 1363 additions and 2 deletions
1360
externals/pep8/pep8.py
vendored
Normal file
1360
externals/pep8/pep8.py
vendored
Normal file
File diff suppressed because it is too large
Load diff
|
@ -45,11 +45,12 @@ class ArcanistPEP8Linter extends ArcanistLinter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function lintPath($path) {
|
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();
|
$options = $this->getPEP8Options();
|
||||||
|
|
||||||
list($stdout) = execx(
|
list($rc, $stdout) = exec_manual(
|
||||||
"/usr/bin/env python2.6 %s {$options} %s",
|
"/usr/bin/env python2.6 %s {$options} %s",
|
||||||
$pep8_bin,
|
$pep8_bin,
|
||||||
$this->getEngine()->getFilePathOnDisk($path));
|
$this->getEngine()->getFilePathOnDisk($path));
|
||||||
|
|
Loading…
Reference in a new issue