mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-10-24 09:38:50 +02:00
df013f6282
Summary: This is a little bit tricky - if both XHPAST and PhutilXHPAST linters lint the same path then they get the same future wrapped in two different Future iterators. Test Plan: $ arc unit Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5015
34 lines
602 B
PHP
34 lines
602 B
PHP
<?php
|
|
|
|
/**
|
|
* @group linter
|
|
*/
|
|
abstract class ArcanistBaseXHPASTLinter extends ArcanistFutureLinter {
|
|
|
|
protected function raiseLintAtToken(
|
|
XHPASTToken $token,
|
|
$code,
|
|
$desc,
|
|
$replace = null) {
|
|
return $this->raiseLintAtOffset(
|
|
$token->getOffset(),
|
|
$code,
|
|
$desc,
|
|
$token->getValue(),
|
|
$replace);
|
|
}
|
|
|
|
protected function raiseLintAtNode(
|
|
XHPASTNode $node,
|
|
$code,
|
|
$desc,
|
|
$replace = null) {
|
|
return $this->raiseLintAtOffset(
|
|
$node->getOffset(),
|
|
$code,
|
|
$desc,
|
|
$node->getConcreteString(),
|
|
$replace);
|
|
}
|
|
|
|
}
|