Page MenuHomePhabricator

ArcanistGeneratedLinter.php
No OneTemporary

ArcanistGeneratedLinter.php

<?php
/**
* Stops other linters from running on generated code.
*
* @group linter
*/
class ArcanistGeneratedLinter extends ArcanistLinter {
public function willLintPaths(array $paths) {
return;
}
public function getLinterName() {
return 'GEN';
}
public function getLintSeverityMap() {
return array();
}
public function getLintNameMap() {
return array(
);
}
public function lintPath($path) {
$data = $this->getData($path);
if (preg_match('/@generated/', $data)) {
$this->stopAllLinters();
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Jul 31, 3:18 AM (1 d, 4 h)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
16430750
Default Alt Text
ArcanistGeneratedLinter.php (568 B)

Event Timeline