1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-10-25 01:58:49 +02:00
phorge-arcanist/src/lint/linter/generated/ArcanistGeneratedLinter.php

36 lines
568 B
PHP
Raw Normal View History

2011-01-10 00:22:25 +01:00
<?php
/**
* Stops other linters from running on generated code.
*
* @group linter
2011-01-10 00:22:25 +01:00
*/
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();
}
}
}