Human Readable Information
- public function getInfoURI() — Return an optional informative URI where humans can learn more about this linter.
- public function getInfoDescription() — Return a brief human-readable description of the linter.
- public function getAdditionalInformation() — Return arbitrary additional information.
- public function getInfoName() — Return a human-readable linter name.
Runtime State
- final public function getActivePath()
- final public function setActivePath($path)
- final public function setEngine($engine)
- final protected function getEngine()
- final public function setLinterID($id) — Set the internal ID for this linter.
- final public function getLinterID() — Get the internal ID for this linter.
Executing the Linter
- public function willLintPaths($paths)
- final public function lintPath($path)
- public function didLintPaths($paths)
- final protected function getExecutableCommand() — Get the composed executable command, including the interpreter and binary but without flags or paths. This can be used to execute `--version` commands.
- final protected function getCommandFlags() — Get the composed flags for the executable, including both mandatory and configured flags.
Interpreters, Binaries and Flags
- abstract public function getDefaultBinary() — Return the default binary name or binary path where the external linter lives. This can either be a binary name which is expected to be installed in PATH (like "jshint"), or a relative path from the project root (like "resources/support/bin/linter") or an absolute path.
- abstract public function getInstallInstructions() — Return a human-readable string describing how to install the linter. This is normally something like "Install such-and-such by running `npm install -g such-and-such`.", but will differ from linter to linter.
- public function getUpgradeInstructions() — Return a human-readable string describing how to upgrade the linter.
- public function shouldExpectCommandErrors(...) — Return true to continue when the external linter exits with an error code. By default, linters which exit with an error code are assumed to have failed. However, some linters exit with a specific code to indicate that lint messages were detected.
- protected function getMandatoryFlags() — Provide mandatory, non-overridable flags to the linter. Generally these are format flags, like `--format=xml`, which must always be given for the output to be usable.
- protected function getDefaultFlags() — Provide default, overridable flags to the linter. Generally these are configuration flags which affect behavior but aren't critical. Flags which are required should be provided in @{method:getMandatoryFlags} instead.
- final public function setFlags($flags) — Override default flags with custom flags. If not overridden, flags provided by @{method:getDefaultFlags} are used.
- final public function setVersionRequirement($version) — Set the binary's version requirement.
- final public function getBinary() — Return the binary or script to execute. This method synthesizes defaults and configuration. You can override the binary with @{method:setBinary}.
- final public function setBinary($bin) — Override the default binary with a new one.
- public function shouldUseInterpreter() — Return true if this linter should use an interpreter (like "python" or "node") in addition to the script.
- public function getDefaultInterpreter() — Return the default interpreter, like "python" or "node". This method is only invoked if @{method:shouldUseInterpreter} has been overridden to return `true`.
- final public function getInterpreter() — Get the effective interpreter. This method synthesizes configuration and defaults.
- final public function setInterpreter($interpreter) — Set the interpreter, overriding any default.
Parsing Linter Output
- abstract protected function parseLinterOutput($path, $err, $stdout, $stderr) — Parse the output of the external lint program into objects of class @{class:ArcanistLintMessage} which `arc` can consume. Generally, this means examining the output and converting each warning or error into a message.
Other Methods
- public function __get($name)
- public function __set($name, $value)
- public function current()
- public function key()
- public function next()
- public function rewind()
- public function valid()
- private function throwOnAttemptedIteration()
- public function getPhobjectClassConstant($key, $byte_limit) — Read the value of a class constant.
- public function getLinterPriority()
- public function setCustomSeverityMap($map)
- public function addCustomSeverityMap($map)
- public function setCustomSeverityRules($rules)
- final public function getProjectRoot()
- final public function getOtherLocation($offset, $path)
- final public function stopAllLinters()
- final public function didStopAllLinters()
- final public function addPath($path)
- final public function setPaths($paths)
- private function filterPaths($paths) — Filter out paths which this linter doesn't act on (for example, because they are binaries and the linter doesn't apply to binaries).
- final public function getPaths()
- final public function addData($path, $data)
- final protected function getData($path)
- public function getCacheVersion()
- final public function getLintMessageFullCode($short_code)
- final public function getLintMessageSeverity($code)
- protected function getDefaultMessageSeverity($code)
- final public function isMessageEnabled($code)
- final public function getLintMessageName($code)
- final protected function addLintMessage($message)
- final public function getLintMessages()
- final public function raiseLintAtLine($line, $char, $code, $description, $original, $replacement)
- final public function raiseLintAtPath($code, $desc)
- final public function raiseLintAtOffset($offset, $code, $description, $original, $replacement)
- public function canRun()
- abstract public function getLinterName()
- public function getVersion()
- final protected function isCodeEnabled($code)
- public function getLintSeverityMap()
- public function getLintNameMap()
- public function getCacheGranularity()
- public function getLinterConfigurationName() — If this linter is selectable via `.arclint` configuration files, return a short, human-readable name to identify it. For example, `"jshint"` or `"pep8"`.
- public function getLinterConfigurationOptions()
- public function setLinterConfigurationValue($key, $value)
- protected function canCustomizeLintSeverities()
- protected function shouldLintBinaryFiles()
- protected function shouldLintDeletedFiles()
- protected function shouldLintDirectories()
- protected function shouldLintSymbolicLinks()
- protected function getLintCodeFromLinterConfigurationKey($code) — Map a configuration lint code to an `arc` lint code. Primarily, this is intended for validation, but can also be used to normalize case or otherwise be more permissive in accepted inputs.
- protected function buildFutures($paths)
- protected function resolveFuture($path, $future)
- final protected function getFuturesLimit()
- protected function didResolveLinterFutures($futures) — Hook for cleaning up resources.
- final public function checkBinaryConfiguration() — Check that the binary and interpreter (if applicable) exist, and throw an exception with a message about how to install them if they do not.
- final protected function checkBinaryVersion($version) — If a binary version requirement has been specified, compare the version of the configured binary to the required version, and if the binary's version is not supported, throw an exception.
- protected function getPathArgumentForLinterFuture($path) — Prepare the path to be added to the command string.