mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-03-11 03:44:48 +01:00
(stable) Promote 2016 Week 32
This commit is contained in:
commit
c9337c2ade
4 changed files with 22 additions and 2 deletions
|
@ -2,5 +2,6 @@
|
|||
"phabricator.uri": "https://secure.phabricator.com/",
|
||||
"load": [
|
||||
"src/"
|
||||
]
|
||||
],
|
||||
"history.immutable": false
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
~~~~~~~~~~
|
||||
~~~~~~~~~~
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue