Umherirrender (Code Review)
2017-12-30 23:36:03 UTC
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/401107 )
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
......................................................................
build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Change-Id: I3d954b80cf3b3196454ebc6cd7def2dcec1b44f2
---
M .phpcs.xml
M composer.json
M rebuild.php
3 files changed, 16 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr refs/changes/07/401107/1
diff --git a/.phpcs.xml b/.phpcs.xml
index a181996..52ddae2 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -3,11 +3,16 @@
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
- <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
+ <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
+ <properties>
+ <property name="ignoreList" type="array" value="getRealCode" />
+ </properties>
+ </rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
<arg name="encoding" value="UTF-8" />
diff --git a/composer.json b/composer.json
index 94edc26..50eda74 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,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/rebuild.php b/rebuild.php
index 784cfaa..0c59612 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -462,29 +462,28 @@
* @param string $code
* @return string
*/
-// @codingStandardsIgnoreStart
function getRealCode( $code ) {
$realCode = $code;
- if ( !strcmp( $code, 'kk' ) )
+ if ( !strcmp( $code, 'kk' ) ) {
$realCode = 'kk-cyrl';
- elseif ( !strcmp( $code, 'ku' ) )
+ } elseif ( !strcmp( $code, 'ku' ) ) {
$realCode = 'ku-arab';
- elseif ( !strcmp( $code, 'sr' ) )
+ } elseif ( !strcmp( $code, 'sr' ) ) {
$realCode = 'sr-ec';
- elseif ( !strcmp( $code, 'tg' ) )
+ } elseif ( !strcmp( $code, 'tg' ) ) {
$realCode = 'tg-cyrl';
- elseif ( !strcmp( $code, 'zh' ) )
+ } elseif ( !strcmp( $code, 'zh' ) ) {
$realCode = 'zh-hans';
- elseif ( !strcmp( $code, 'pt' ) )
+ } elseif ( !strcmp( $code, 'pt' ) ) {
$realCode = 'pt-br';
- elseif ( !strcmp( $code, 'pt-pt' ) )
+ } elseif ( !strcmp( $code, 'pt-pt' ) ) {
$realCode = 'pt';
- elseif ( !strcmp( $code, 'az-arab' ) )
+ } elseif ( !strcmp( $code, 'az-arab' ) ) {
$realCode = 'azb';
+ }
return $realCode;
}
-// @codingStandardsIgnoreEnd
$maintClass = 'CLDRRebuild';
require_once RUN_MAINTENANCE_IF_MAIN;
--
To view, visit https://gerrit.wikimedia.org/r/401107
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d954b80cf3b3196454ebc6cd7def2dcec1b44f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <***@web.de>
Change subject: build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
......................................................................
build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Change-Id: I3d954b80cf3b3196454ebc6cd7def2dcec1b44f2
---
M .phpcs.xml
M composer.json
M rebuild.php
3 files changed, 16 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/cldr refs/changes/07/401107/1
diff --git a/.phpcs.xml b/.phpcs.xml
index a181996..52ddae2 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -3,11 +3,16 @@
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
- <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
+ <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
+ <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
+ <properties>
+ <property name="ignoreList" type="array" value="getRealCode" />
+ </properties>
+ </rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
<arg name="encoding" value="UTF-8" />
diff --git a/composer.json b/composer.json
index 94edc26..50eda74 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,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/rebuild.php b/rebuild.php
index 784cfaa..0c59612 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -462,29 +462,28 @@
* @param string $code
* @return string
*/
-// @codingStandardsIgnoreStart
function getRealCode( $code ) {
$realCode = $code;
- if ( !strcmp( $code, 'kk' ) )
+ if ( !strcmp( $code, 'kk' ) ) {
$realCode = 'kk-cyrl';
- elseif ( !strcmp( $code, 'ku' ) )
+ } elseif ( !strcmp( $code, 'ku' ) ) {
$realCode = 'ku-arab';
- elseif ( !strcmp( $code, 'sr' ) )
+ } elseif ( !strcmp( $code, 'sr' ) ) {
$realCode = 'sr-ec';
- elseif ( !strcmp( $code, 'tg' ) )
+ } elseif ( !strcmp( $code, 'tg' ) ) {
$realCode = 'tg-cyrl';
- elseif ( !strcmp( $code, 'zh' ) )
+ } elseif ( !strcmp( $code, 'zh' ) ) {
$realCode = 'zh-hans';
- elseif ( !strcmp( $code, 'pt' ) )
+ } elseif ( !strcmp( $code, 'pt' ) ) {
$realCode = 'pt-br';
- elseif ( !strcmp( $code, 'pt-pt' ) )
+ } elseif ( !strcmp( $code, 'pt-pt' ) ) {
$realCode = 'pt';
- elseif ( !strcmp( $code, 'az-arab' ) )
+ } elseif ( !strcmp( $code, 'az-arab' ) ) {
$realCode = 'azb';
+ }
return $realCode;
}
-// @codingStandardsIgnoreEnd
$maintClass = 'CLDRRebuild';
require_once RUN_MAINTENANCE_IF_MAIN;
--
To view, visit https://gerrit.wikimedia.org/r/401107
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d954b80cf3b3196454ebc6cd7def2dcec1b44f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <***@web.de>