mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-10-25 01:58:49 +02:00
35 lines
580 B
PHP
35 lines
580 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* This linter just stops the lint process when a file is marked as generated
|
||
|
* code.
|
||
|
*/
|
||
|
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();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|