Discussion:
[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Libraryupgrader (Code Review)
2017-12-30 03:28:31 UTC
Permalink
Libraryupgrader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/400962 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
......................................................................

build: Updating mediawiki/mediawiki-codesniffer to 15.0.0

The following sniffs are failing and were disabled:
* Generic.Files.OneObjectStructurePerFile.MultipleFound
* Squiz.Scope.MethodScope.Missing

The following sniffs now pass and were enabled:
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound

Change-Id: I5d4b9d113cb2a5218fe592a71c716515d2dfbc7e
---
M .phpcs.xml
M composer.json
M includes/specials/SpecialUploadWizard.php
3 files changed, 5 insertions(+), 7 deletions(-)


git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/62/400962/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 618c98d..5595999 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
- <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
- <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ <exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
diff --git a/composer.json b/composer.json
index 0d46d2f..35cfa63 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
- "mediawiki/mediawiki-codesniffer": "14.1.0",
+ "mediawiki/mediawiki-codesniffer": "15.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.2.1"
},
diff --git a/includes/specials/SpecialUploadWizard.php b/includes/specials/SpecialUploadWizard.php
index 9c9bf29..f56c4ed 100644
--- a/includes/specials/SpecialUploadWizard.php
+++ b/includes/specials/SpecialUploadWizard.php
@@ -331,8 +331,7 @@
);
}

- return
- Html::rawElement(
+ return Html::rawElement(
'div',
[],
Html::rawElement(
@@ -349,8 +348,7 @@

// TODO move this into UploadWizard.js or some other javascript resource so the upload wizard
// can be dynamically included ( for example the add media wizard )
- return
- // @codingStandardsIgnoreStart
+ return // @codingStandardsIgnoreStart
'<div id="upload-wizard" class="upload-section">' .
'<div id="mwe-upwiz-tutorial-html" style="display:none;">' .
$tutorialHtml .
--
To view, visit https://gerrit.wikimedia.org/r/400962
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d4b9d113cb2a5218fe592a71c716515d2dfbc7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <***@tools.wmflabs.org>
jenkins-bot (Code Review)
2017-12-30 22:19:25 UTC
Permalink
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/400962 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
......................................................................


build: Updating mediawiki/mediawiki-codesniffer to 15.0.0

The following sniff is failing and was disabled:
* Squiz.Scope.MethodScope.Missing

The following sniff now pass and was enabled:
* MediaWiki.Files.ClassMatchesFilename.WrongCase

The following sniff is renamed:
* MediaWiki.Files.OneClassPerFile.MultipleFound
-> Generic.Files.OneObjectStructurePerFile.MultipleFound

Change-Id: I5d4b9d113cb2a5218fe592a71c716515d2dfbc7e
---
M .phpcs.xml
M composer.json
M includes/specials/SpecialUploadWizard.php
3 files changed, 22 insertions(+), 25 deletions(-)

Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified



diff --git a/.phpcs.xml b/.phpcs.xml
index 618c98d..5595999 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
- <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
- <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ <exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
diff --git a/composer.json b/composer.json
index 0d46d2f..35cfa63 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
- "mediawiki/mediawiki-codesniffer": "14.1.0",
+ "mediawiki/mediawiki-codesniffer": "15.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.2.1"
},
diff --git a/includes/specials/SpecialUploadWizard.php b/includes/specials/SpecialUploadWizard.php
index 9c9bf29..cc34855 100644
--- a/includes/specials/SpecialUploadWizard.php
+++ b/includes/specials/SpecialUploadWizard.php
@@ -331,16 +331,15 @@
);
}

- return
+ return Html::rawElement(
+ 'div',
+ [],
Html::rawElement(
- 'div',
- [],
- Html::rawElement(
- 'p',
- [ 'style' => 'text-align: center' ],
- wfMessage( 'mwe-upwiz-extension-disabled' )->text()
- ) . $linkHtml
- );
+ 'p',
+ [ 'style' => 'text-align: center' ],
+ wfMessage( 'mwe-upwiz-extension-disabled' )->text()
+ ) . $linkHtml
+ );
}

// always load the html: even if the tutorial is skipped, users can
@@ -349,20 +348,18 @@

// TODO move this into UploadWizard.js or some other javascript resource so the upload wizard
// can be dynamically included ( for example the add media wizard )
- return
// @codingStandardsIgnoreStart
- '<div id="upload-wizard" class="upload-section">' .
- '<div id="mwe-upwiz-tutorial-html" style="display:none;">' .
- $tutorialHtml .
- '</div>' .
-
- // if loading takes > 2 seconds display spinner. Note we are evading Resource Loader here, and linking directly. Because we want an image to appear if RL's package is late.
- // using some &nbsp;'s which is a bit of superstition, to make sure jQuery will hide this (it seems that it doesn't sometimes, when it has no content)
- // the min-width & max-width is copied from the #uploadWizard properties, so in nice browsers the spinner is right where the button will go.
- '<div id="mwe-first-spinner" style="min-width:750px; max-width:900px; height:200px; line-height:200px; text-align:center;">' .
- '&nbsp;<img src="' . $wgExtensionAssetsPath . '/UploadWizard/resources/images/24px-spinner-0645ad.gif" width="24" height="24" />&nbsp;' .
- '</div>' .
- '</div>';
+ return '<div id="upload-wizard" class="upload-section">' .
+ '<div id="mwe-upwiz-tutorial-html" style="display:none;">' .
+ $tutorialHtml .
+ '</div>' .
+ // if loading takes > 2 seconds display spinner. Note we are evading Resource Loader here, and linking directly. Because we want an image to appear if RL's package is late.
+ // using some &nbsp;'s which is a bit of superstition, to make sure jQuery will hide this (it seems that it doesn't sometimes, when it has no content)
+ // the min-width & max-width is copied from the #uploadWizard properties, so in nice browsers the spinner is right where the button will go.
+ '<div id="mwe-first-spinner" style="min-width:750px; max-width:900px; height:200px; line-height:200px; text-align:center;">' .
+ '&nbsp;<img src="' . $wgExtensionAssetsPath . '/UploadWizard/resources/images/24px-spinner-0645ad.gif" width="24" height="24" />&nbsp;' .
+ '</div>' .
+ '</div>';
// @codingStandardsIgnoreEnd
}
--
To view, visit https://gerrit.wikimedia.org/r/400962
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d4b9d113cb2a5218fe592a71c716515d2dfbc7e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader <***@tools.wmflabs.org>
Gerrit-Reviewer: Bartosz DziewoƄski <***@gmail.com>
Gerrit-Reviewer: Legoktm <***@member.fsf.org>
Gerrit-Reviewer: Umherirrender <***@web.de>
Gerrit-Reviewer: jenkins-bot <>
Loading...