1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-10-24 17:48:50 +02:00
phorge-arcanist/src/lint/linter/ArcanistGeneratedLinter.php

36 lines
573 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
*/
final class ArcanistGeneratedLinter extends ArcanistLinter {
2011-01-10 00:22:25 +01:00
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)) {
2011-01-10 00:22:25 +01:00
$this->stopAllLinters();
}
}
}