Platonides has uploaded a new change for review.
https://gerrit.wikimedia.org/r/57934
Change subject: Treat a { as closing a require line.
......................................................................
Treat a { as closing a require line.
Fixes wrong warning «Did not found the expected require of
folder/{fwrite(STDERR,"Unable to read \n» from the code:
if ( !include_once( $fileName ) ) {
fwrite( STDERR, "Unable to read $fileName\n" );
exit( 1 );
}
present on mergeMessageFileList.php (it was being confused
by the include_once statement being inside an if() instead of
finished by a ;
Change-Id: I899c1662bd7136893973f04c2959e4988ca01963
---
M check-vars.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/code-utils
refs/changes/34/57934/1
diff --git a/check-vars.php b/check-vars.php
index 751cc4e..15bf780 100755
--- a/check-vars.php
+++ b/check-vars.php
@@ -929,6 +929,11 @@
case self::IN_REQUIRE_WAITING:
case self::IN_FUNCTION_REQUIRE:
+ if ( $token == '{' ) {
+ $this->mBraces++;
+ $token = ';';
+ }
+
if ( $token == ';' ) {
$requirePath = trim(
$requirePath, ')("' );
--
To view, visit https://gerrit.wikimedia.org/r/57934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I899c1662bd7136893973f04c2959e4988ca01963
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
Gerrit-Branch: master
Gerrit-Owner: Platonides <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits