1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 08:42:40 +01:00

Include real PEP8 version and options in lint cache key

Summary: This should be done for all external and configurable linters.

Test Plan: Linted file with lint problems, changed options, relinted.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4475
This commit is contained in:
vrana 2013-01-16 12:10:17 -08:00
parent 8142aab9d3
commit 90129c5432
2 changed files with 3 additions and 2 deletions

View file

@ -185,6 +185,7 @@ abstract class ArcanistLintEngine {
$versions = array($this->getCacheVersion());
foreach ($linters as $linter) {
$linter->setEngine($this);
$versions[] = get_class($linter).':'.$linter->getCacheVersion();
}
$this->cacheVersion = crc32(implode("\n", $versions));
@ -196,7 +197,6 @@ abstract class ArcanistLintEngine {
$linter_name = get_class($linter);
}
try {
$linter->setEngine($this);
if (!$linter->canRun()) {
continue;
}

View file

@ -24,7 +24,8 @@ final class ArcanistPEP8Linter extends ArcanistLinter {
}
public function getCacheVersion() {
return '1.3.4';
list($stdout) = execx('%C --version', $this->getPEP8Path());
return $stdout.$this->getPEP8Options();
}
public function getPEP8Options() {