wikimedia/mediawiki-core

View on GitHub

Showing 10,790 of 10,790 total issues

File Article.php has 1857 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * User interface for page actions.
 *
 * This program is free software; you can redistribute it and/or modify
Severity: Major
Found in includes/page/Article.php - About 5 days to fix

    File RevisionStore.php has 1835 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Service for looking up page revisions.
     *
     * This program is free software; you can redistribute it and/or modify
    Severity: Major
    Found in includes/Revision/RevisionStore.php - About 5 days to fix

      File pako_deflate.js has 1820 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* pako 1.0.10 nodeca/pako */(function(f){if(typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
      'use strict';
      
      
      var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&
      Severity: Major
      Found in resources/lib/pako/pako_deflate.js - About 4 days to fix

        Function 5 has 957 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],5:[function(require,module,exports){
        'use strict';
        
        // (C) 1995-2013 Jean-loup Gailly and Mark Adler
        // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
        Severity: Major
        Found in resources/lib/pako/pako_deflate.js - About 4 days to fix

          Function loader has 924 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  loader: ( function () {
          
                      /**
                       * Fired via mw.track on various resource loading errors.
                       *
          Severity: Major
          Found in resources/src/startup/mediawiki.js - About 4 days to fix

            File apisandbox.js has 1703 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            ( function () {
                'use strict';
                var ApiSandbox, Util, WidgetMethods, Validators,
                    panel, booklet, oldhash, windowManager,
                    formatDropdown,
            Severity: Major
            Found in resources/src/mediawiki.special.apisandbox/apisandbox.js - About 4 days to fix

              File jsminplus.php has 1703 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              // phpcs:ignoreFile -- File external to MediaWiki. Ignore coding conventions checks.
              /**
               * JSMinPlus version 1.4
               *
              Severity: Major
              Found in includes/libs/jsminplus.php - About 4 days to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                ;(function (global, factory) {
                   typeof exports === 'object' && typeof module !== 'undefined'
                       && typeof require === 'function' ? factory(require('../moment')) :
                   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                   factory(global.moment)
                Severity: Major
                Found in resources/lib/moment/locale/hi.js and 1 other location - About 4 days to fix
                resources/lib/moment/locale/gu.js on lines 5..132

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 758.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                ;(function (global, factory) {
                   typeof exports === 'object' && typeof module !== 'undefined'
                       && typeof require === 'function' ? factory(require('../moment')) :
                   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                   factory(global.moment)
                Severity: Major
                Found in resources/lib/moment/locale/gu.js and 1 other location - About 4 days to fix
                resources/lib/moment/locale/hi.js on lines 5..130

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 758.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                File AuthManager.php has 1671 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * Authentication (and possibly Authorization in the future) system entry point
                 *
                 * This program is free software; you can redistribute it and/or modify
                Severity: Major
                Found in includes/auth/AuthManager.php - About 4 days to fix

                  File LoadBalancer.php has 1616 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * Database load balancing manager
                   *
                   * This program is free software; you can redistribute it and/or modify
                  Severity: Major
                  Found in includes/libs/rdbms/loadbalancer/LoadBalancer.php - About 4 days to fix

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    ;(function (global, factory) {
                       typeof exports === 'object' && typeof module !== 'undefined'
                           && typeof require === 'function' ? factory(require('../moment')) :
                       typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                       factory(global.moment)
                    Severity: Major
                    Found in resources/lib/moment/locale/sr-cyrl.js and 2 other locations - About 4 days to fix
                    resources/lib/moment/locale/me.js on lines 5..129
                    resources/lib/moment/locale/sr.js on lines 5..128

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 726.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    ;(function (global, factory) {
                       typeof exports === 'object' && typeof module !== 'undefined'
                           && typeof require === 'function' ? factory(require('../moment')) :
                       typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                       factory(global.moment)
                    Severity: Major
                    Found in resources/lib/moment/locale/me.js and 2 other locations - About 4 days to fix
                    resources/lib/moment/locale/sr-cyrl.js on lines 5..126
                    resources/lib/moment/locale/sr.js on lines 5..128

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 726.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    ;(function (global, factory) {
                       typeof exports === 'object' && typeof module !== 'undefined'
                           && typeof require === 'function' ? factory(require('../moment')) :
                       typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                       factory(global.moment)
                    Severity: Major
                    Found in resources/lib/moment/locale/sr.js and 2 other locations - About 4 days to fix
                    resources/lib/moment/locale/me.js on lines 5..129
                    resources/lib/moment/locale/sr-cyrl.js on lines 5..126

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 726.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    File oojs-ui-windows.js has 1531 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*!
                     * OOUI v0.39.3
                     * https://www.mediawiki.org/wiki/OOUI
                     *
                     * Copyright 2011–2020 OOUI Team and other contributors.
                    Severity: Major
                    Found in resources/lib/ooui/oojs-ui-windows.js - About 4 days to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                      ;(function (global, factory) {
                         typeof exports === 'object' && typeof module !== 'undefined'
                             && typeof require === 'function' ? factory(require('../moment')) :
                         typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                         factory(global.moment)
                      Severity: Major
                      Found in resources/lib/moment/locale/es-us.js and 1 other location - About 4 days to fix
                      resources/lib/moment/locale/es-do.js on lines 4..113

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 684.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                      ;(function (global, factory) {
                         typeof exports === 'object' && typeof module !== 'undefined'
                             && typeof require === 'function' ? factory(require('../moment')) :
                         typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                         factory(global.moment)
                      Severity: Major
                      Found in resources/lib/moment/locale/es-do.js and 1 other location - About 4 days to fix
                      resources/lib/moment/locale/es-us.js on lines 6..115

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 684.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      File jquery.ui.datepicker.js has 1518 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*!
                       * jQuery UI Datepicker 1.9.2
                       * http://jqueryui.com
                       *
                       * Copyright 2012 jQuery Foundation and other contributors
                      Severity: Major
                      Found in resources/lib/jquery.ui/jquery.ui.datepicker.js - About 4 days to fix

                        File Skin.php has 1502 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * Base class for all skins.
                         *
                         * This program is free software; you can redistribute it and/or modify
                        Severity: Major
                        Found in includes/skins/Skin.php - About 4 days to fix

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                          ;(function (global, factory) {
                             typeof exports === 'object' && typeof module !== 'undefined'
                                 && typeof require === 'function' ? factory(require('../moment')) :
                             typeof define === 'function' && define.amd ? define(['../moment'], factory) :
                             factory(global.moment)
                          Severity: Major
                          Found in resources/lib/moment/locale/zh-tw.js and 2 other locations - About 3 days to fix
                          resources/lib/moment/locale/zh-hk.js on lines 8..112
                          resources/lib/moment/locale/zh-mo.js on lines 7..111

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 660.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language