1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-19 16:38:51 +02:00

(stable) Promote 2016 Week 32

This commit is contained in:
epriestley 2016-08-06 14:39:50 -07:00
commit c9337c2ade
4 changed files with 22 additions and 2 deletions

View file

@ -2,5 +2,6 @@
"phabricator.uri": "https://secure.phabricator.com/",
"load": [
"src/"
]
],
"history.immutable": false
}

View file

@ -181,7 +181,10 @@ final class ArcanistGitLandEngine
$this->getTargetFullRef()));
}
list($changes) = $api->execxLocal('diff HEAD --');
// TODO: This could probably be cleaner by asking the API a question
// about working copy status instead of running a raw diff command. See
// discussion in T11435.
list($changes) = $api->execxLocal('diff --no-ext-diff HEAD --');
$changes = trim($changes);
if (!strlen($changes)) {
throw new Exception(

View file

@ -369,6 +369,19 @@ final class ArcanistPHPCompatibilityXHPASTLinterRule
}
}
$literals = $root->selectDescendantsOftype('n_ARRAY_LITERAL');
foreach ($literals as $literal) {
$open_token = head($literal->getTokens())->getValue();
if ($open_token == '[') {
$this->raiseLintAtNode(
$literal,
pht(
'The short array syntax ("[...]") was not introduced until '.
'PHP 5.4, but this codebase targets an earlier version of PHP. '.
'You can rewrite this expression using `array(...)` instead.'));
}
}
$closures = $this->getAnonymousClosures($root);
foreach ($closures as $closure) {
$static_accesses = $closure

View file

@ -22,12 +22,15 @@ final class SomeClass extends Phobject {
0b1;
[];
~~~~~~~~~~
error:3:5
error:4:9
error:12:7
error:18:7
error:23:1
error:25:1
~~~~~~~~~~
~~~~~~~~~~
{