1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 00:49:11 +02:00

Provide coverage for the xhpast $a->b->c parsing bug exposed by tautolinting the

codebase.

Summary:

Test Plan:

Reviewers:

CC:
This commit is contained in:
epriestley 2011-02-13 16:43:32 -08:00
parent b3b2da4608
commit d2b5d9108b
3 changed files with 6 additions and 1 deletions

View file

@ -62,7 +62,7 @@ abstract class ArcanistLicenseLinter extends ArcanistLinter {
foreach ($patterns as $pattern) {
if (preg_match($pattern, $data, $matches)) {
$expect = rtrim(implode('', array_slice($matches, 1)))."\n".$license;
if (rtrim($matches[0]) != rtrim($expect)) {
if (trim($matches[0]) != trim($expect)) {
$this->raiseLintAtOffset(
0,
self::LINT_NO_LICENSE_HEADER,

View file

@ -153,6 +153,8 @@ class ArcanistXHPASTLinter extends ArcanistLinter {
'<' => true,
'==' => true,
'===' => true,
'!=' => true,
'!==' => true,
'>=' => true,
'>' => true,
);

View file

@ -12,6 +12,9 @@ if ($y[2] - $y[2]) {
if ($x == $y) {
}
// See xhpast 0.54 -> 0.55.
return $a->sub->value < $b->sub->value;
~~~~~~~~~~
error:3:5
error:6:5