1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 23:02:41 +01:00

Added paths to search for python linters

Summary: Added paths to search for python linters

Test Plan: Linted in ubuntu

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2414

Differential Revision: https://secure.phabricator.com/D4648
This commit is contained in:
Jesse Mullan 2013-01-26 05:31:25 -08:00 committed by epriestley
parent df04c79a90
commit c49997a6e8
3 changed files with 11 additions and 4 deletions

View file

@ -45,7 +45,7 @@ final class ArcanistPEP8Linter extends ArcanistLinter {
$bin = $working_copy->getConfig('lint.pep8.bin');
if ($bin === null && $prefix === null) {
$bin = csprintf('/usr/bin/env python2.6 %s',
$bin = csprintf('/usr/bin/env python %s',
phutil_get_library_root('arcanist').
'/../externals/pep8/pep8.py');
} else {

View file

@ -35,7 +35,7 @@ final class ArcanistPyFlakesLinter extends ArcanistLinter {
// Default to just finding pyflakes in the users path
$pyflakes_bin = 'pyflakes';
$python_path = '';
$python_path = array();
// If a pyflakes path was specified, then just use that as the
// pyflakes binary and assume that the libraries will be imported
@ -50,9 +50,13 @@ final class ArcanistPyFlakesLinter extends ArcanistLinter {
$pyflakes_bin = $pyflakes_path;
} else if ($pyflakes_prefix !== null) {
$pyflakes_bin = $pyflakes_prefix.'/bin/pyflakes';
$python_path = $pyflakes_prefix.'/lib/python2.6/site-packages:';
$python_path[] = $pyflakes_prefix.'/lib/python2.7/site-packages';
$python_path[] = $pyflakes_prefix.'/lib/python2.7/dist-packages';
$python_path[] = $pyflakes_prefix.'/lib/python2.6/site-packages';
$python_path[] = $pyflakes_prefix.'/lib/python2.6/dist-packages';
}
$python_path[] = '';
$python_path = implode(':', $python_path);
$options = $this->getPyFlakesOptions();
$f = new ExecFuture(

View file

@ -133,7 +133,10 @@ final class ArcanistPyLintLinter extends ArcanistLinter {
$python_path = array();
foreach ($prefixes as $prefix) {
if ($prefix !== null) {
$python_path[] = $prefix.'/lib/python2.7/site-packages';
$python_path[] = $prefix.'/lib/python2.7/dist-packages';
$python_path[] = $prefix.'/lib/python2.6/site-packages';
$python_path[] = $prefix.'/lib/python2.6/dist-packages';
}
}