wikimedia/mediawiki-core

View on GitHub

Showing 11,545 of 11,545 total issues

Function prettyYamlValue has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function prettyYamlValue(value) {
    var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
    if (value === undefined) {
      // Not supported in JSON/YAML, turn into string
      // and let the below output it as bare string.
Severity: Minor
Found in resources/lib/qunitjs/qunit.js - About 1 hr to fix

    Function StringMap has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var StringMap = typeof g.Map === 'function' && typeof g.Map.prototype.keys === 'function' && typeof g.Symbol === 'function' && _typeof(g.Symbol.iterator) === 'symbol' ? g.Map : function StringMap(input) {
        var _this = this;
        var store = Object.create(null);
        var hasOwn = Object.prototype.hasOwnProperty;
        this.has = function (strKey) {
    Severity: Minor
    Found in resources/lib/qunitjs/qunit.js - About 1 hr to fix

      Function test has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function test(callback) {
                  var type = typeof callback;
      
                  if (type !== "function") {
                      throw new TypeError("sinon.test needs to wrap a test function, got " + type);
      Severity: Minor
      Found in resources/lib/sinonjs/sinon.js - About 1 hr to fix

        Function toggleClass has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            toggleClass: function( value, stateVal ) {
                var classNames, className, i, self,
                    type = typeof value,
                    isValidValue = type === "string" || Array.isArray( value );
        
        
        Severity: Minor
        Found in resources/lib/jquery/jquery.js - About 1 hr to fix

          Function getSetOffset has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function getSetOffset(input, keepLocalTime, keepMinutes) {
                  var offset = this._offset || 0,
                      localAdjust;
                  if (!this.isValid()) {
                      return input != null ? this : NaN;
          Severity: Minor
          Found in resources/lib/moment/moment.js - About 1 hr to fix

            Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function on( elem, types, selector, data, fn, one ) {
                var origFn, type;
            
                // Types can be a map of types/handlers
                if ( typeof types === "object" ) {
            Severity: Minor
            Found in resources/lib/jquery/jquery.js - About 1 hr to fix

              Function toISOString$1 has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function toISOString$1() {
                      // for ISO strings we do not use the normal bubbling rules:
                      //  * milliseconds bubble up until they become hours
                      //  * days do not bubble at all
                      //  * months bubble up until they become years
              Severity: Minor
              Found in resources/lib/moment/moment.js - About 1 hr to fix

                Function onInputKeyDown has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                OO.ui.TagMultiselectWidget.prototype.onInputKeyDown = function ( e ) {
                    const withMetaKey = e.metaKey || e.ctrlKey;
                
                    const isMovementInsideInput = ( dir ) => {
                        const inputRange = this.input.getRange(),
                Severity: Minor
                Found in resources/lib/ooui/oojs-ui-widgets.js - About 1 hr to fix

                  Function updateItemVisibility has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  OO.ui.MenuSelectWidget.prototype.updateItemVisibility = function () {
                      if ( !this.filterFromInput || !this.$input ) {
                          this.clip();
                          return;
                      }
                  Severity: Minor
                  Found in resources/lib/ooui/oojs-ui-core.js - About 1 hr to fix

                    Function _checkForIntersections has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    IntersectionObserver.prototype._checkForIntersections = function() {
                      if (!this.root && crossOriginUpdater && !crossOriginRect) {
                        // Cross origin monitoring, but no initial data available yet.
                        return;
                      }
                    Severity: Minor
                    Found in resources/lib/intersection-observer/intersection-observer.js - About 1 hr to fix

                      Function keydown_checker has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          AbstractChosen.prototype.keydown_checker = function(evt) {
                            var ref, stroke;
                            stroke = (ref = evt.which) != null ? ref : evt.keyCode;
                            this.search_field_scale();
                            if (stroke !== 8 && this.pending_backstroke) {
                      Severity: Minor
                      Found in resources/lib/jquery.chosen/chosen.jquery.js - About 1 hr to fix

                        Function wrapAction has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function wrapAction(name, action) {
                                  return function () {
                                      setActivePinia(pinia);
                                      const args = Array.from(arguments);
                                      const afterCallbackList = [];
                        Severity: Minor
                        Found in resources/lib/pinia/pinia.iife.js - About 1 hr to fix

                          Method applySettings has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function applySettings( array $settings ) {
                                  // First extract config variables that change the behavior of SettingsBuilder.
                                  // No merge strategies are applied, defaults are set in the constructor.
                                  if ( isset( $settings['config'] ) ) {
                                      $this->updateSettingsConfig( $settings['config'] );
                          Severity: Minor
                          Found in includes/Settings/SettingsBuilder.php - About 1 hr to fix

                            Method __construct has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function __construct(
                                    array $params = [],
                                    ?callable $mapper = null,
                                    ?Client $client = null,
                                    ?callable $resolver = null
                            Severity: Minor
                            Found in includes/Settings/Source/EtcdSource.php - About 1 hr to fix

                              Method isValidMoveTarget has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function isValidMoveTarget() {
                                      # Is it an existing file?
                                      if ( $this->newTitle->inNamespace( NS_FILE ) ) {
                                          $file = $this->repoGroup->getLocalRepo()->newFile( $this->newTitle );
                                          $file->load( IDBAccessObject::READ_LATEST );
                              Severity: Minor
                              Found in includes/page/MovePage.php - About 1 hr to fix

                                Method loadFullCodexLibrary has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function loadFullCodexLibrary( Context $context ) {
                                        // Add all Codex JS files to the module's package
                                        if ( !$this->isStyleOnly ) {
                                            $jsFilePath = $this->makeFilePath( 'codex.umd.cjs' );
                                
                                
                                Severity: Minor
                                Found in includes/ResourceLoader/CodexModule.php - About 1 hr to fix

                                  Method checkSettings has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function checkSettings( string $name, $settings, array $options, array $ret ): array {
                                          $ret = parent::checkSettings( $name, $settings, $options, $ret );
                                  
                                          $ret['allowedKeys'] = array_merge( $ret['allowedKeys'], [
                                              self::PARAM_ALLOWED_USER_TYPES, self::PARAM_RETURN_OBJECT,
                                  Severity: Minor
                                  Found in includes/ParamValidator/TypeDef/UserDef.php - About 1 hr to fix

                                    Method sendPersonalised has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private function sendPersonalised( UserEmailContact $watchingUser, $source ): StatusValue {
                                            // From the PHP manual:
                                            //   Note: The to parameter cannot be an address in the form of
                                            //   "Something <someone@example.com>". The mail command will not parse
                                            //   this properly while talking with the MTA.
                                    Severity: Minor
                                    Found in includes/mail/EmailNotification.php - About 1 hr to fix

                                      Method outputVariesOnRevisionMetaData has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function outputVariesOnRevisionMetaData(
                                              ParserOutput $parserOutput,
                                              $actualPageId,
                                              $actualRevId,
                                              $actualRevTimestamp
                                      Severity: Minor
                                      Found in includes/Revision/RenderedRevision.php - About 1 hr to fix

                                        Method getAtomicSectionUpdate has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private function getAtomicSectionUpdate(
                                                IDatabase $dbw,
                                                WikiPage $wikiPage,
                                                RevisionRecord $newRevisionRecord,
                                                CommentStoreComment $summary,
                                        Severity: Minor
                                        Found in includes/Storage/PageUpdater.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language