Umherirrender has uploaded a new change for review.
https://gerrit.wikimedia.org/r/246164
Change subject: Remove empty line comments
......................................................................
Remove empty line comments
Remove empty line comments as found by the
MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment sniff
Change-Id: I5d694f7a7d3bc97e16300ba03c60ad17f3c912a5
---
M includes/Html.php
M includes/HtmlFormatter.php
M includes/Linker.php
M includes/MediaWiki.php
M includes/User.php
M includes/libs/IEUrlExtension.php
M includes/upload/UploadBase.php
M includes/upload/UploadStash.php
M languages/classes/LanguageHy.php
M languages/classes/LanguageWa.php
M tests/phpunit/MediaWikiTestCase.php
M tests/phpunit/includes/LinkFilterTest.php
M tests/phpunit/maintenance/DumpTestCase.php
M tests/phpunit/maintenance/MaintenanceTest.php
M tests/phpunit/maintenance/backupTextPassTest.php
15 files changed, 9 insertions(+), 29 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/64/246164/1
diff --git a/includes/Html.php b/includes/Html.php
index c61dca8..506b9cc 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -597,7 +597,6 @@
// we may as well not call htmlspecialchars().
// @todo FIXME: Verify that we actually need to
// escape \n\r\t here, and explain why, exactly.
- #
// We could call Sanitizer::encodeAttribute()
for this, but we
// don't because we're stubborn and like our
marginal savings on
// byte size from not having to encode
unnecessary quotes.
diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php
index 83db268..2d81b28 100644
--- a/includes/HtmlFormatter.php
+++ b/includes/HtmlFormatter.php
@@ -74,10 +74,8 @@
}
// Workaround for bug that caused spaces before
references
- // to disappear during processing:
- // https://phabricator.wikimedia.org/T55086
- //
- // Please replace with a better fix if one can be found.
+ // to disappear during processing:
https://phabricator.wikimedia.org/T55086
+ // TODO: Please replace with a better fix if one can be
found.
$html = str_replace( ' <', ' <', $html );
libxml_use_internal_errors( true );
@@ -295,7 +293,6 @@
$html = $this->fixLibXml( $html );
if ( wfIsWindows() ) {
// Cleanup for CRLF misprocessing of unknown
origin on Windows.
- //
// If this error continues in the future,
please track it down in the
// XML code paths if possible and fix there.
$html = str_replace( ' ', '', $html );
diff --git a/includes/Linker.php b/includes/Linker.php
index 2e33bd1..e821004 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -623,7 +623,6 @@
# Create a thumbnail. Alignment depends on the writing
direction of
# the page content language (right-aligned for LTR
languages,
# left-aligned for RTL languages)
- #
# If a thumbnail width has not been provided, it is set
# to the default user option as specified in
Language*.php
if ( $fp['align'] == '' ) {
diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index aee6ee1..3399790 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -203,10 +203,9 @@
// curid and oldid request parameters would allow page
titles to be enumerated even
// when they are not guessable. So we reset the title
to Special:Badtitle before the
// permissions error is displayed.
- //
+
// The skin mostly uses $this->context->getTitle()
these days, but some extensions
// still use $wgTitle.
-
$badTitle = SpecialPage::getTitleFor( 'Badtitle' );
$this->context->setTitle( $badTitle );
$wgTitle = $badTitle;
@@ -628,7 +627,7 @@
// redirecting to HTTPS. It's likely
such a request is going
// to fail due to post data being lost,
but let's try anyway
// and just log the instance.
- //
+
// @todo FIXME: See if we could issue a
307 or 308 here, need
// to see how clients (automated &
browser) behave when we do
wfDebugLog( 'RedirectedPosts',
"Redirected from HTTP to HTTPS: $oldUrl" );
diff --git a/includes/User.php b/includes/User.php
index 75649a7..5017685 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -5209,7 +5209,7 @@
# Note that the pattern requirement will always be satisfied if
the
# input is empty, so we need required in all cases.
- #
+
# @todo FIXME: Bug 23769: This needs to not claim the password
is required
# if e-mail confirmation is being used. Since HTML5 input
validation
# is b0rked anyway in some browsers, just return nothing. When
it's
diff --git a/includes/libs/IEUrlExtension.php b/includes/libs/IEUrlExtension.php
index 49d05d4..216d9b7 100644
--- a/includes/libs/IEUrlExtension.php
+++ b/includes/libs/IEUrlExtension.php
@@ -119,7 +119,6 @@
if ( !preg_match( '/^[a-zA-Z0-9_-]+$/', $extension ) ) {
// Non-alphanumeric extension, unlikely to be
registered.
- //
// The regex above is known to match all registered
file extensions
// in a default Windows XP installation. It's important
to allow
// extensions with ampersands and percent signs, since
that reduces
diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 8514187..5f4a16a 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -1763,7 +1763,7 @@
// We're not using the normalized form of the extension.
// Normal form is lowercase, using most common of
alternate
// extensions (eg 'jpg' rather than 'JPEG').
- //
+
// Check for another file using the normalized form...
$nt_lc = Title::makeTitle( NS_FILE,
"{$partname}.{$normalizedExtension}" );
$file_lc = wfLocalFile( $nt_lc );
diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php
index b9a1bbf..b971c00 100644
--- a/includes/upload/UploadStash.php
+++ b/includes/upload/UploadStash.php
@@ -221,7 +221,6 @@
// If no key was supplied, make one. a mysql insertid would be
totally
// reasonable here, except that for historical reasons, the key
is this
// random thing instead. At least it's not guessable.
- //
// Some things that when combined will make a suitably unique
key.
// see: http://www.jwz.org/doc/mid.html
list( $usec, $sec ) = explode( ' ', microtime() );
diff --git a/languages/classes/LanguageHy.php b/languages/classes/LanguageHy.php
index b7767eb..7cedcc5 100644
--- a/languages/classes/LanguageHy.php
+++ b/languages/classes/LanguageHy.php
@@ -68,10 +68,10 @@
case 'accusative': # Հայցական հոլով
# stub
break;
- case 'instrumental': #
+ case 'instrumental':
# stub
break;
- case 'prepositional': #
+ case 'prepositional':
# stub
break;
}
diff --git a/languages/classes/LanguageWa.php b/languages/classes/LanguageWa.php
index 98d138d..3520298 100644
--- a/languages/classes/LanguageWa.php
+++ b/languages/classes/LanguageWa.php
@@ -50,7 +50,6 @@
$datePreference = $this->dateFormat( $format );
# ISO (YYYY-mm-dd) format
- #
# we also output this format for YMD (eg: 2001 January 15)
if ( $datePreference == 'ISO 8601' ) {
$d = substr( $ts, 0, 4 ) . '-' . substr( $ts, 4, 2 ) .
'-' . substr( $ts, 6, 2 );
@@ -64,7 +63,6 @@
}
# Walloon format
- #
# we output this in all other cases
$m = substr( $ts, 4, 2 );
$n = substr( $ts, 6, 2 );
diff --git a/tests/phpunit/MediaWikiTestCase.php
b/tests/phpunit/MediaWikiTestCase.php
index 9bbbf9f..ab4652c 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -181,7 +181,6 @@
$fileName = $this->getNewTempFile();
// Converting the temporary /file/ to a /directory/
- //
// The following is not atomic, but at least we now have a
single place,
// where temporary directory creation is bundled and can be
improved
unlink( $fileName );
diff --git a/tests/phpunit/includes/LinkFilterTest.php
b/tests/phpunit/includes/LinkFilterTest.php
index f011f47..9093564 100644
--- a/tests/phpunit/includes/LinkFilterTest.php
+++ b/tests/phpunit/includes/LinkFilterTest.php
@@ -125,21 +125,16 @@
array( '', 'gopher://*.test.com/',
'gopher://gopher.test.com/0/v2/vstat' ),
array( 'telnet://', '*.test.com',
'telnet://shell.test.com/~home/' ),
- //
// The following only work in PHP >= 5.3.7, due to a
bug in parse_url which eats
// the path from the url
(https://bugs.php.net/bug.php?id=54180)
- //
// array( '', 'http://test.com',
'http://test.com/index?arg=1' ),
// array( 'http://', '*.test.com',
'http://www.test.com/index?arg=1' ),
// array( '' ,
//
'http://xx23124:[email protected]:12345/dir' ,
//
'http://name:[email protected]:12345/dir/dir/file.xyz.php#__se__?arg1=_&arg2[]=4rtg'
// ),
- //
- //
// Tests for false positives
- //
array( 'http://', 'test.com', 'http://www.test.com',
false ),
array( 'http://', 'www1.test.com',
'http://www.test.com', false ),
array( 'http://', '*.test.com',
'http://www.test.t.com', false ),
@@ -166,10 +161,8 @@
array( '', 'http://test.com:8080/dir/',
'http://test.com:808/dir/', false ),
array( '', 'http://test.com/dir/index.html',
'http://test.com/dir/index.php', false ),
- //
// These are false positives too and ideally shouldn't
match, but that
// would require using regexes and RLIKE instead of LIKE
- //
// array( null, 'http://*.test.com',
'http://www.test.com:80', false ),
// array( '',
'https://*.wikimedia.org/r/#/q/status:open,n,z',
//
'https://gerrit.wikimedia.org/XXX/r/#/q/status:open,n,z', false ),
diff --git a/tests/phpunit/maintenance/DumpTestCase.php
b/tests/phpunit/maintenance/DumpTestCase.php
index 8c76397..c846c06 100644
--- a/tests/phpunit/maintenance/DumpTestCase.php
+++ b/tests/phpunit/maintenance/DumpTestCase.php
@@ -102,7 +102,7 @@
// expectOutput[...] functions. However, the PHPUnit shipped
prediactes
// do not allow to check /each/ line of the output using
/readable/ REs.
// So we ...
- //
+
// 1. ... add a dummy output checking to make PHPUnit not
complain
// about unchecked test output
$this->expectOutputRegex( '//' );
diff --git a/tests/phpunit/maintenance/MaintenanceTest.php
b/tests/phpunit/maintenance/MaintenanceTest.php
index 454e9c1..5c6a6cd 100644
--- a/tests/phpunit/maintenance/MaintenanceTest.php
+++ b/tests/phpunit/maintenance/MaintenanceTest.php
@@ -4,7 +4,6 @@
// instead of the MaintenanceFixup hack below. However, we cannot do
// without changing the visibility and without working around hacks in
// Maintenance.php
-//
// For the same reason, we cannot just use FakeMaintenance.
/**
diff --git a/tests/phpunit/maintenance/backupTextPassTest.php
b/tests/phpunit/maintenance/backupTextPassTest.php
index c216864..f5dd98b 100644
--- a/tests/phpunit/maintenance/backupTextPassTest.php
+++ b/tests/phpunit/maintenance/backupTextPassTest.php
@@ -301,7 +301,6 @@
// The dump (hopefully) did take long enough to produce more
than one
// checkpoint file.
- //
// We now check all the checkpoint files for validity.
$files = scandir( $nameOutputDir );
--
To view, visit https://gerrit.wikimedia.org/r/246164
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d694f7a7d3bc97e16300ba03c60ad17f3c912a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits