Merge "Remove @codingStandardsIgnore from long lines"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 23 Oct 2017 02:07:48 +0000 (02:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 23 Oct 2017 02:07:48 +0000 (02:07 +0000)
includes/api/ApiMain.php
includes/diff/DifferenceEngine.php
includes/http/PhpHttpRequest.php
includes/logging/LogFormatter.php
includes/shell/Shell.php
includes/tidy/Balancer.php

index aea441b..edc1a3e 100644 (file)
@@ -125,7 +125,6 @@ class ApiMain extends ApiBase {
                'none' => 'ApiFormatNone',
        ];
 
-       // @codingStandardsIgnoreStart String contenation on "msg" not allowed to break long line
        /**
         * List of user roles that are specifically relevant to the API.
         * [ 'right' => [ 'msg'    => 'Some message with a $1',
@@ -142,7 +141,6 @@ class ApiMain extends ApiBase {
                        'params' => [ ApiBase::LIMIT_SML2, ApiBase::LIMIT_BIG2 ]
                ]
        ];
-       // @codingStandardsIgnoreEnd
 
        /**
         * @var ApiFormatBase
index 899054d..ef67477 100644 (file)
@@ -605,14 +605,15 @@ class DifferenceEngine extends ContextSource {
                $out->addHTML( "<hr class='diff-hr' id='mw-oldid' />
                <h2 class='diff-currentversion-title'>{$revHeader}</h2>\n" );
                # Page content may be handled by a hooked call instead...
-               # @codingStandardsIgnoreStart Ignoring long lines.
                if ( Hooks::run( 'ArticleContentOnDiff', [ $this, $out ] ) ) {
                        $this->loadNewText();
                        $out->setRevisionId( $this->mNewid );
                        $out->setRevisionTimestamp( $this->mNewRev->getTimestamp() );
                        $out->setArticleFlag( true );
 
-                       if ( !Hooks::run( 'ArticleContentViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
+                       if ( !Hooks::run( 'ArticleContentViewCustom',
+                               [ $this->mNewContent, $this->mNewPage, $out ] )
+                       ) {
                                // Handled by extension
                        } else {
                                // Normal page
@@ -631,13 +632,14 @@ class DifferenceEngine extends ContextSource {
                                # WikiPage::getParserOutput() should not return false, but just in case
                                if ( $parserOutput ) {
                                        // Allow extensions to change parser output here
-                                       if ( Hooks::run( 'DifferenceEngineRenderRevisionAddParserOutput', [ $this, $out, $parserOutput, $wikiPage ] ) ) {
+                                       if ( Hooks::run( 'DifferenceEngineRenderRevisionAddParserOutput',
+                                               [ $this, $out, $parserOutput, $wikiPage ] )
+                                       ) {
                                                $out->addParserOutput( $parserOutput );
                                        }
                                }
                        }
                }
-               # @codingStandardsIgnoreEnd
 
                // Allow extensions to optionally not show the final patrolled link
                if ( Hooks::run( 'DifferenceEngineRenderRevisionShowFinalPatrolLink' ) ) {
index 0c5d162..0636314 100644 (file)
@@ -47,13 +47,11 @@ class PhpHttpRequest extends MWHttpRequest {
                if ( $this->caInfo ) {
                        $certLocations = [ 'manual' => $this->caInfo ];
                } elseif ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength
                        // Default locations, based on
                        // https://www.happyassassin.net/2015/01/12/a-note-about-ssltls-trusted-certificate-stores-and-platforms/
                        // PHP 5.5 and older doesn't have any defaults, so we try to guess ourselves.
                        // PHP 5.6+ gets the CA location from OpenSSL as long as it is not set manually,
                        // so we should leave capath/cafile empty there.
-                       // @codingStandardsIgnoreEnd
                        $certLocations = array_filter( [
                                getenv( 'SSL_CERT_DIR' ),
                                getenv( 'SSL_CERT_PATH' ),
index ab7c5cb..b28bb7d 100644 (file)
@@ -261,19 +261,15 @@ class LogFormatter {
                                                $text = wfMessage( 'undeletedarticle' )
                                                        ->rawParams( $target )->inContentLanguage()->escaped();
                                                break;
-                                       // @codingStandardsIgnoreStart Long line
                                        //case 'revision': // Revision deletion
                                        //case 'event': // Log deletion
                                        // see https://github.com/wikimedia/mediawiki/commit/a9c243b7b5289dad204278dbe7ed571fd914e395
                                        //default:
-                                       // @codingStandardsIgnoreEnd
                                }
                                break;
 
                        case 'patrol':
-                               // @codingStandardsIgnoreStart Long line
                                // https://github.com/wikimedia/mediawiki/commit/1a05f8faf78675dc85984f27f355b8825b43efff
-                               // @codingStandardsIgnoreEnd
                                // Create a diff link to the patrolled revision
                                if ( $entry->getSubtype() === 'patrol' ) {
                                        $diffLink = htmlspecialchars(
index a660a22..604c96a 100644 (file)
@@ -113,14 +113,12 @@ class Shell {
 
                        if ( wfIsWindows() ) {
                                // Escaping for an MSVC-style command line parser and CMD.EXE
-                               // @codingStandardsIgnoreStart For long URLs
                                // Refs:
                                //  * https://web.archive.org/web/20020708081031/http://mailman.lyra.org/pipermail/scite-interest/2002-March/000436.html
                                //  * https://technet.microsoft.com/en-us/library/cc723564.aspx
                                //  * T15518
                                //  * CR r63214
                                // Double the backslashes before any double quotes. Escape the double quotes.
-                               // @codingStandardsIgnoreEnd
                                $tokens = preg_split( '/(\\\\*")/', $arg, -1, PREG_SPLIT_DELIM_CAPTURE );
                                $arg = '';
                                $iteration = 0;
index fbe9270..82c35bb 100644 (file)
@@ -1669,13 +1669,11 @@ class BalanceActiveFormattingElements {
                $this->addToNoahList( $b );
        }
 
-       // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
        /**
         * Reconstruct the active formatting elements.
         * @param BalanceStack $stack The open elements stack
         * @see https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements
         */
-       // @codingStandardsIgnoreEnd
        public function reconstruct( $stack ) {
                $entry = $this->tail;
                // If there are no entries in the list of active formatting elements,