mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +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:
parent
8142aab9d3
commit
90129c5432
2 changed files with 3 additions and 2 deletions
|
@ -185,6 +185,7 @@ abstract class ArcanistLintEngine {
|
||||||
|
|
||||||
$versions = array($this->getCacheVersion());
|
$versions = array($this->getCacheVersion());
|
||||||
foreach ($linters as $linter) {
|
foreach ($linters as $linter) {
|
||||||
|
$linter->setEngine($this);
|
||||||
$versions[] = get_class($linter).':'.$linter->getCacheVersion();
|
$versions[] = get_class($linter).':'.$linter->getCacheVersion();
|
||||||
}
|
}
|
||||||
$this->cacheVersion = crc32(implode("\n", $versions));
|
$this->cacheVersion = crc32(implode("\n", $versions));
|
||||||
|
@ -196,7 +197,6 @@ abstract class ArcanistLintEngine {
|
||||||
$linter_name = get_class($linter);
|
$linter_name = get_class($linter);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$linter->setEngine($this);
|
|
||||||
if (!$linter->canRun()) {
|
if (!$linter->canRun()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@ final class ArcanistPEP8Linter extends ArcanistLinter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCacheVersion() {
|
public function getCacheVersion() {
|
||||||
return '1.3.4';
|
list($stdout) = execx('%C --version', $this->getPEP8Path());
|
||||||
|
return $stdout.$this->getPEP8Options();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPEP8Options() {
|
public function getPEP8Options() {
|
||||||
|
|
Loading…
Reference in a new issue