wikimedia/mediawiki-extensions-ContentTranslation

View on GitHub

Showing 1,062 of 1,062 total issues

File Chart.js has 7953 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 2.2.1
 *
Severity: Major
Found in lib/chart.js/Chart.js - About 3 wks to fix

    Function 26 has 812 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{}],26:[function(require,module,exports){
    /*global window: false */
    /*global document: false */
    "use strict";
    
    
    Severity: Major
    Found in lib/chart.js/Chart.js - About 4 days to fix

      Function exports has 809 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(Chart) {
          //Global Chart helpers object for utility methods and classes
          var helpers = Chart.helpers = {};
      
          //-- Basic js utility methods
      Severity: Major
      Found in lib/chart.js/Chart.js - About 4 days to fix

        Function 4 has 580 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"2":2,"5":5}],4:[function(require,module,exports){
        /* MIT license */
        
        module.exports = {
          rgb2hsl: rgb2hsl,
        Severity: Major
        Found in lib/chart.js/Chart.js - About 2 days to fix

          Function 31 has 551 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{}],31:[function(require,module,exports){
          "use strict";
          
          module.exports = function(Chart) {
          
          
          Severity: Major
          Found in lib/chart.js/Chart.js - About 2 days to fix

            Function exports has 549 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function(Chart) {
            
                var helpers = Chart.helpers;
            
                Chart.defaults.scale = {
            Severity: Major
            Found in lib/chart.js/Chart.js - About 2 days to fix

              Function 34 has 547 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{}],34:[function(require,module,exports){
              "use strict";
              
              module.exports = function(Chart) {
              
              
              Severity: Major
              Found in lib/chart.js/Chart.js - About 2 days to fix

                Function exports has 545 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function(Chart) {
                
                    var helpers = Chart.helpers;
                
                    Chart.defaults.global.tooltips = {
                Severity: Major
                Found in lib/chart.js/Chart.js - About 2 days to fix

                  Function 23 has 478 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{}],23:[function(require,module,exports){
                  "use strict";
                  
                  module.exports = function(Chart) {
                  
                  
                  Severity: Major
                  Found in lib/chart.js/Chart.js - About 2 days to fix

                    Function exports has 476 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function(Chart) {
                    
                        var helpers = Chart.helpers;
                        //Create a dictionary of chart types, to allow for extension of existing types
                        Chart.types = {};
                    Severity: Major
                    Found in lib/chart.js/Chart.js - About 2 days to fix

                      Function 15 has 450 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],15:[function(require,module,exports){
                      "use strict";
                      
                      module.exports = function(Chart) {
                      
                      
                      Severity: Major
                      Found in lib/chart.js/Chart.js - About 2 days to fix

                        Function exports has 448 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function(Chart) {
                        
                            var helpers = Chart.helpers;
                        
                            Chart.defaults.bar = {
                        Severity: Major
                        Found in lib/chart.js/Chart.js - About 2 days to fix

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

                                  getRuler: function (index) {
                                      var me = this;
                                      var meta = me.getMeta();
                                      var yScale = me.getScaleForId(meta.yAxisID);
                                      var datasetCount = me.getBarCount();
                          Severity: Major
                          Found in lib/chart.js/Chart.js and 1 other location - About 2 days to fix
                          lib/chart.js/Chart.js on lines 1962..1997

                          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 368.

                          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

                                  getRuler: function(index) {
                                      var me = this;
                                      var meta = me.getMeta();
                                      var xScale = me.getScaleForId(meta.xAxisID);
                                      var datasetCount = me.getBarCount();
                          Severity: Major
                          Found in lib/chart.js/Chart.js and 1 other location - About 2 days to fix
                          lib/chart.js/Chart.js on lines 2307..2341

                          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 368.

                          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

                          Function 3 has 399 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"6":6}],3:[function(require,module,exports){
                          /* MIT license */
                          var convert = require(5);
                          var string = require(2);
                          
                          
                          Severity: Major
                          Found in lib/chart.js/Chart.js - About 1 day to fix

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

                                    calculateBarX: function (index, datasetIndex) {
                                        var me = this;
                                        var meta = me.getMeta();
                                        var xScale = me.getScaleForId(meta.xAxisID);
                                        var value = Number(me.getDataset().data[index]);
                            Severity: Major
                            Found in lib/chart.js/Chart.js and 1 other location - About 1 day to fix
                            lib/chart.js/Chart.js on lines 2045..2077

                            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 325.

                            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

                                    calculateBarY: function(index, datasetIndex) {
                                        var me = this;
                                        var meta = me.getMeta();
                                        var yScale = me.getScaleForId(meta.yAxisID);
                                        var value = Number(me.getDataset().data[index]);
                            Severity: Major
                            Found in lib/chart.js/Chart.js and 1 other location - About 1 day to fix
                            lib/chart.js/Chart.js on lines 2353..2385

                            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 325.

                            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

                            mw.cx.ui.PageTitleWidget = function ( model, config ) {
                                // Configuration initialization
                                config = $.extend( config, {
                                    classes: [ 'cx-pagetitle' ],
                                    type: 'text',
                            Severity: Major
                            Found in modules/ui/widgets/mw.cx.ui.PageTitleWidget.js and 1 other location - About 1 day to fix
                            modules/ui/widgets/mw.cx.ui.SectionTitleWidget.js on lines 13..44

                            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 317.

                            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

                            mw.cx.ui.SectionTitleWidget = function ( model, config ) {
                                // Configuration initialization
                                config = $.extend( config, {
                                    classes: [ 'cx-pagetitle cx-sectiontitle' ],
                                    type: 'text',
                            Severity: Major
                            Found in modules/ui/widgets/mw.cx.ui.SectionTitleWidget.js and 1 other location - About 1 day to fix
                            modules/ui/widgets/mw.cx.ui.PageTitleWidget.js on lines 13..44

                            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 317.

                            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 ext.cx.stats.js has 721 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*!
                             * ContentTranslation Stats
                             *
                             * @copyright See AUTHORS.txt
                             * @license GPL-2.0-or-later
                            Severity: Major
                            Found in modules/stats/ext.cx.stats.js - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language