wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function init has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function init() {
        let offset, $overlay,
            isFloating = false;

        function updateAreaMode() {
Severity: Minor
Found in resources/src/mediawiki.notification/notification.js - About 1 hr to fix

    Function _exifHandler has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        JpegMeta.JpegFile.prototype._exifHandler = function _exifHandler(mark, pos) {
            if (this.exif !== undefined) {
            throw new Error("Multiple JFIF segments found");
            }
            
    Severity: Minor
    Found in resources/src/mediawiki.libs.jpegmeta/jpegmeta.js - About 1 hr to fix

      Function MwWidgetsRowWidget has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      mw.widgets.RowWidget = function MwWidgetsRowWidget( config ) {
          config = config || {};
      
          // Parent constructor
          mw.widgets.RowWidget.super.call( this, config );
      Severity: Minor
      Found in resources/src/mediawiki.widgets/Table/mw.widgets.RowWidget.js - About 1 hr to fix

        Function updateWatchLinkAttributes has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function updateWatchLinkAttributes( $link, action, state, expiry ) {
                // A valid but empty jQuery object shouldn't throw a TypeError
                if ( !$link.length ) {
                    return;
                }
        Severity: Minor
        Found in resources/src/mediawiki.page.watch.ajax/watch-ajax.js - About 1 hr to fix

          Function set has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  set: function ( module ) {
                      var descriptor = registry[ module ],
                          key = getModuleKey( module );
          
                      if (
          Severity: Minor
          Found in resources/src/startup/mediawiki.loader.js - About 1 hr to fix

            Function _sfc_render$j has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
              const _component_cdx_icon = resolveComponent("cdx-icon");
              return openBlock(), createElementBlock(
                "div",
                {
            Severity: Minor
            Found in resources/lib/codex/codex.js - About 1 hr to fix

              Function matcherFromTokens has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function matcherFromTokens( tokens ) {
                  var checkContext, matcher, j,
                      len = tokens.length,
                      leadingRelative = Expr.relative[ tokens[ 0 ].type ],
                      implicitRelative = leadingRelative || Expr.relative[ " " ],
              Severity: Minor
              Found in resources/lib/jquery/jquery.js - About 1 hr to fix

                Function tokenize has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function tokenize( selector, parseOnly ) {
                    var matched, match, tokens, type,
                        soFar, groups, preFilters,
                        cached = tokenCache[ selector + " " ];
                
                
                Severity: Minor
                Found in resources/lib/jquery/jquery.js - About 1 hr to fix

                  Function configFromStringAndArray has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function configFromStringAndArray(config) {
                          var tempConfig,
                              bestMoment,
                              scoreToBeat,
                              i,
                  Severity: Minor
                  Found in resources/lib/moment/moment.js - About 1 hr to fix

                    Function setFlags has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    OO.ui.mixin.FlaggedElement.prototype.setFlags = function ( flags ) {
                        const changes = {},
                            add = [],
                            remove = [],
                            classPrefix = 'oo-ui-flaggedElement-';
                    Severity: Minor
                    Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                      Function extract has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      OO.ui.ToolFactory.prototype.extract = function ( collection, used ) {
                          const names = [];
                      
                          collection = !Array.isArray( collection ) ? [ collection ] : collection;
                      
                      
                      Severity: Minor
                      Found in resources/lib/ooui/oojs-ui-toolbars.js - About 1 hr to fix

                        Function scale has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        $.effects.effect.scale = function( o, done ) {
                        
                            // Create element
                            var el = $( this ),
                                options = $.extend( true, {}, o ),
                        Severity: Minor
                        Found in resources/lib/jquery.ui/jquery.ui.effect-scale.js - About 1 hr to fix

                          Function initialize has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          OO.ui.ProcessDialog.prototype.initialize = function () {
                              // Parent method
                              OO.ui.ProcessDialog.super.prototype.initialize.call( this );
                          
                              // Properties
                          Severity: Minor
                          Found in resources/lib/ooui/oojs-ui-windows.js - About 1 hr to fix

                            Function formatStoreForInspectorState has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function formatStoreForInspectorState(store) {
                                  if (isPinia(store)) {
                                      const storeNames = Array.from(store._s.keys());
                                      const storeMap = store._s;
                                      const state = {
                            Severity: Minor
                            Found in resources/lib/pinia/pinia.iife.js - About 1 hr to fix

                              Function _monitorIntersections has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              IntersectionObserver.prototype._monitorIntersections = function(doc) {
                                var win = doc.defaultView;
                                if (!win) {
                                  // Already destroyed.
                                  return;
                              Severity: Minor
                              Found in resources/lib/intersection-observer/intersection-observer.js - About 1 hr to fix

                                Method removeWatchBatchForUser has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function removeWatchBatchForUser( UserIdentity $user, array $titles ): bool {
                                        if ( !$user->isRegistered() || $this->readOnlyMode->isReadOnly() ) {
                                            return false;
                                        }
                                        if ( !$titles ) {
                                Severity: Minor
                                Found in includes/watchlist/WatchedItemStore.php - About 1 hr to fix

                                  Method checkUserConfigPermissions has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function checkUserConfigPermissions(
                                          $action,
                                          UserIdentity $user,
                                          PermissionStatus $status,
                                          $rigor,
                                  Severity: Minor
                                  Found in includes/Permissions/PermissionManager.php - About 1 hr to fix

                                    Method getPageByNameViaLinkCache has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function getPageByNameViaLinkCache(
                                            int $namespace,
                                            string $dbKey,
                                            int $queryFlags = IDBAccessObject::READ_NORMAL
                                        ): ?ExistingPageRecord {
                                    Severity: Minor
                                    Found in includes/page/PageStore.php - About 1 hr to fix

                                      Method moveSubpagesInternal has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function moveSubpagesInternal( callable $subpageMoveCallback ) {
                                              // Do the source and target namespaces support subpages?
                                              if ( !$this->nsInfo->hasSubpages( $this->oldTitle->getNamespace() ) ) {
                                                  return Status::newFatal( 'namespace-nosubpages',
                                                      $this->nsInfo->getCanonicalName( $this->oldTitle->getNamespace() ) );
                                      Severity: Minor
                                      Found in includes/page/MovePage.php - About 1 hr to fix

                                        Method getWatchedItemsForUser has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getWatchedItemsForUser( UserIdentity $user, array $options = [] ) {
                                                if ( !$user->isRegistered() ) {
                                                    // TODO: should this just return an empty array or rather complain loud at this point
                                                    // as e.g. ApiBase::getWatchlistUser does?
                                                    return [];
                                        Severity: Minor
                                        Found in includes/watchlist/WatchedItemQueryService.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language