Changeset View
Changeset View
Standalone View
Standalone View
src/lint/engine/ArcanistLintEngine.php
| Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | final public function run() { | ||||
| return $this->results; | return $this->results; | ||||
| } | } | ||||
| final public function isSeverityEnabled($severity) { | final public function isSeverityEnabled($severity) { | ||||
| $minimum = $this->minimumSeverity; | $minimum = $this->minimumSeverity; | ||||
| return ArcanistLintSeverity::isAtLeastAsSevere($severity, $minimum); | return ArcanistLintSeverity::isAtLeastAsSevere($severity, $minimum); | ||||
| } | } | ||||
| final private function shouldUseCache( | private function shouldUseCache( | ||||
| $cache_granularity, | $cache_granularity, | ||||
| $repository_version) { | $repository_version) { | ||||
| switch ($cache_granularity) { | switch ($cache_granularity) { | ||||
| case ArcanistLinter::GRANULARITY_FILE: | case ArcanistLinter::GRANULARITY_FILE: | ||||
| return true; | return true; | ||||
| case ArcanistLinter::GRANULARITY_DIRECTORY: | case ArcanistLinter::GRANULARITY_DIRECTORY: | ||||
| case ArcanistLinter::GRANULARITY_REPOSITORY: | case ArcanistLinter::GRANULARITY_REPOSITORY: | ||||
| Show All 22 Lines | abstract class ArcanistLintEngine extends Phobject { | ||||
| abstract public function buildLinters(); | abstract public function buildLinters(); | ||||
| final public function setRepositoryVersion($version) { | final public function setRepositoryVersion($version) { | ||||
| $this->repositoryVersion = $version; | $this->repositoryVersion = $version; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| final private function isRelevantMessage(ArcanistLintMessage $message) { | private function isRelevantMessage(ArcanistLintMessage $message) { | ||||
| // When a user runs "arc lint", we default to raising only warnings on | // When a user runs "arc lint", we default to raising only warnings on | ||||
| // lines they have changed (errors are still raised anywhere in the | // lines they have changed (errors are still raised anywhere in the | ||||
| // file). The list of $changed lines may be null, to indicate that the | // file). The list of $changed lines may be null, to indicate that the | ||||
| // path is a directory or a binary file so we should not exclude | // path is a directory or a binary file so we should not exclude | ||||
| // warnings. | // warnings. | ||||
| if (!$this->changedLines || | if (!$this->changedLines || | ||||
| $message->isError() || | $message->isError() || | ||||
| ▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines | |||||