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

35 lines
580 B
PHP
Raw Normal View History

2011-01-10 00:22:25 +01:00
<?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();
}
}
}