wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function openBrowserWindowCoveringElement has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function openBrowserWindowCoveringElement( url, el, mouseEvent ) {
    // Tested on:
    // * Windows 10 22H2, Firefox and Edge, 100% and 200% scale screens, -/=/+ zoom
    //   All good.
    // * Windows 10 22H2, Firefox and Edge, 150% scale screen, -/=/+ zoom (another device, tablet)
Severity: Major
Found in resources/src/mediawiki.authenticationPopup/AuthPopup.js - About 2 hrs to fix

    Function detectParserForColumn has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function detectParserForColumn( table, rows, column ) {
            let l = parsers.length,
                config = $( table ).data( 'tablesorter' ).config,
                nextRow = false,
                // Start with 1 because 0 is the fallback parser
    Severity: Major
    Found in resources/src/jquery.tablesorter/jquery.tablesorter.js - About 2 hrs to fix

      Function MWWCheckMatrixWidget has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          mw.widgets.CheckMatrixWidget = function MWWCheckMatrixWidget( config ) {
              config = config || {};
      
              // Parent constructor
              mw.widgets.CheckMatrixWidget.super.call( this, config );
      Severity: Major
      Found in resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js - About 2 hrs to fix

        Function getSuggestionsPromise has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            mw.widgets.TitleWidget.prototype.getSuggestionsPromise = function () {
                const api = this.getApi(),
                    query = this.getQueryValue(),
                    promiseAbortObject = { abort: function () {
                        // Do nothing. This is just so OOUI doesn't break due to abort being undefined.
        Severity: Major
        Found in resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js - About 2 hrs to fix

          Function refresh has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function refresh(skip, threshold) {
              if (skip === void 0) {
                skip = false;
              }
              if (threshold === void 0) {
          Severity: Major
          Found in resources/lib/codex/codex.js - About 2 hrs to fix

            Function computeCoordsFromPlacement has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function computeCoordsFromPlacement(_ref, placement, rtl) {
              let {
                reference,
                floating
              } = _ref;
            Severity: Major
            Found in resources/lib/codex/codex.js - About 2 hrs to fix

              Function diffHalfMatch has 53 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  DiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) {
                    var longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm;
                    longtext = text1.length > text2.length ? text1 : text2;
                    shorttext = text1.length > text2.length ? text2 : text1;
                    if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
              Severity: Major
              Found in resources/lib/qunitjs/qunit.js - About 2 hrs to fix

                Function Test has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function Test(settings) {
                    this.expected = null;
                    this.assertions = [];
                    this.module = config.currentModule;
                    this.steps = [];
                Severity: Major
                Found in resources/lib/qunitjs/qunit.js - About 2 hrs to fix

                  Function match has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function match(object, matcher) {
                          if (matcher && typeof matcher.test === "function") {
                              return matcher.test(object);
                          }
                  
                  
                  Severity: Major
                  Found in resources/lib/sinonjs/sinon.js - About 2 hrs to fix

                    Function OoUiBookletLayout has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    OO.ui.BookletLayout = function OoUiBookletLayout( config ) {
                        // Configuration initialization
                        config = config || {};
                    
                        // Parent constructor
                    Severity: Major
                    Found in resources/lib/ooui/oojs-ui-widgets.js - About 2 hrs to fix

                      Function _generateMonthYearHeader has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
                                  secondary, monthNames, monthNamesShort) {
                              var changeMonth = this._get(inst, 'changeMonth');
                              var changeYear = this._get(inst, 'changeYear');
                              var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
                      Severity: Major
                      Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 2 hrs to fix

                        Function parse has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            parse: function( red, green, blue, alpha ) {
                                if ( red === undefined ) {
                                    this._rgba = [ null, null, null, null ];
                                    return this;
                                }
                        Severity: Major
                        Found in resources/lib/jquery.ui/jquery.ui.effect.js - About 2 hrs to fix

                          Function dispatch has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            Store.prototype.dispatch = function dispatch (_type, _payload) {
                                var this$1$1 = this;
                          
                              // check object-style dispatch
                              var ref = unifyObjectStyle(_type, _payload);
                          Severity: Major
                          Found in resources/lib/vuex/vuex.global.js - About 2 hrs to fix

                            Method showDiffPage has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function showDiffPage() {
                                    $context = $this->getContext();
                                    $outputPage = $context->getOutput();
                                    $outputPage->addBodyClasses( 'mw-article-diff' );
                                    $request = $context->getRequest();
                            Severity: Major
                            Found in includes/page/Article.php - About 2 hrs to fix

                              Method getCachedParserOutput has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getCachedParserOutput(
                                      PageRecord $page,
                                      ParserOptions $parserOptions,
                                      ?RevisionRecord $revision = null,
                                      int $options = 0
                              Severity: Major
                              Found in includes/page/ParserOutputAccess.php - About 2 hrs to fix

                                Method beginPrimaryAuthentication has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function beginPrimaryAuthentication( array $reqs ) {
                                        $req = AuthenticationRequest::getRequestByClass( $reqs, PasswordAuthenticationRequest::class );
                                        if ( !$req || $req->username === null || $req->password === null ) {
                                            return AuthenticationResponse::newAbstain();
                                        }
                                Severity: Major
                                Found in includes/auth/LocalPasswordPrimaryAuthenticationProvider.php - About 2 hrs to fix

                                  Method initialiseForm has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function initialiseForm(): bool {
                                          $this->edittime = $this->page->getTimestamp();
                                          $this->editRevId = $this->page->getLatest();
                                  
                                          $dummy = $this->contentHandlerFactory
                                  Severity: Major
                                  Found in includes/editpage/EditPage.php - About 2 hrs to fix

                                    Method getLocksOnServer has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function getLocksOnServer( $lockSrv, array $pathsByType ) {
                                            $status = StatusValue::newGood();
                                    
                                            $memc = $this->getCache( $lockSrv );
                                            // List of affected paths
                                    Severity: Major
                                    Found in includes/libs/lockmanager/MemcLockManager.php - About 2 hrs to fix

                                      Method getMessage has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static function getMessage( $code ) {
                                              static $statusMessage = [
                                                  100 => 'Continue',
                                                  101 => 'Switching Protocols',
                                                  102 => 'Processing',
                                      Severity: Major
                                      Found in includes/libs/HttpStatus.php - About 2 hrs to fix

                                        Method assessConnectionLoss has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function assessConnectionLoss(
                                                string $verb,
                                                float $walltime,
                                                CriticalSessionInfo $priorSessInfo
                                            ) {
                                        Severity: Major
                                        Found in includes/libs/rdbms/database/Database.php - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language