From 90129c54323a64a499eef389ab2121a84b78ff90 Mon Sep 17 00:00:00 2001 From: vrana Date: Wed, 16 Jan 2013 12:10:17 -0800 Subject: [PATCH] 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 --- src/lint/engine/ArcanistLintEngine.php | 2 +- src/lint/linter/ArcanistPEP8Linter.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lint/engine/ArcanistLintEngine.php b/src/lint/engine/ArcanistLintEngine.php index 358ba281..80771c2b 100644 --- a/src/lint/engine/ArcanistLintEngine.php +++ b/src/lint/engine/ArcanistLintEngine.php @@ -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; } diff --git a/src/lint/linter/ArcanistPEP8Linter.php b/src/lint/linter/ArcanistPEP8Linter.php index c12b50f2..bc644c63 100644 --- a/src/lint/linter/ArcanistPEP8Linter.php +++ b/src/lint/linter/ArcanistPEP8Linter.php @@ -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() {