talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

/*!
 * Ext JS Library 3.3.0
 * Copyright(c) 2006-2010 Ext JS, Inc.
 * licensing@extjs.com
 * http://www.extjs.com/license
Severity: Minor
Found in app/assets/javascripts/ext/src/widgets/chart/Chart.js - About 6 hrs to fix

    Function onMouseMove has 155 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        onMouseMove : function(e){
            if(this.enabled && this.activeHandle){
                try{// try catch so if something goes wrong the user doesn't get hung
    
                if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) {
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/Resizable.js - About 6 hrs to fix

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

          refresh : function(headersToo) {
              this.fireEvent('beforerefresh', this);
              this.grid.stopEditing(true);
      
              var result = this.renderBody();
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js and 1 other location - About 6 hrs to fix
      app/assets/javascripts/ext/src/widgets/grid/PivotGridView.js on lines 314..328

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

      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

          refresh : function(headersToo) {
              this.fireEvent('beforerefresh', this);
              this.grid.stopEditing(true);
              
              var result = this.renderBody();
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/grid/PivotGridView.js and 1 other location - About 6 hrs to fix
      app/assets/javascripts/ext/src/widgets/grid/GridView.js on lines 1759..1773

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

      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

      VrTabPanel has 45 functions (exceeds 20 allowed). Consider refactoring.
      Open

      Ext.ux.tot2ivn.VrTabPanel = Ext.extend(Ext.Panel,  {
          /** Vertical Tab Panel cfg */
          /**
           * @cfg {Boolean} border
           * Set to true to draw the outline border of the whole panel. Defaults to true.

        File Button.js has 423 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
         * Ext JS Library 3.3.0
         * Copyright(c) 2006-2010 Ext JS, Inc.
         * licensing@extjs.com
         * http://www.extjs.com/license
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/Button.js - About 6 hrs to fix

          Function MenuMgr has 153 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Ext.menu.MenuMgr = function(){
             var menus, active, groups = {}, attached = false, lastShow = new Date();
          
             // private - called when first menu is created
             function init(){
          Severity: Major
          Found in app/assets/javascripts/ext/src/widgets/menu/MenuMgr.js - About 6 hrs to fix

            Function DataTip has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
            Open

            Ext.ux.DataTip = Ext.extend(Ext.ToolTip, (function() {
            
            //  Target the body (if the host is a Panel), or, if there is no body, the main Element.
                function onHostRender() {
                    var e = this.body || this.el;
            Severity: Minor
            Found in app/assets/javascripts/ext_extensions/DataTip.js - About 6 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

                stop: function(clearQueue, gotoEnd){
                    var timers = jQuery.timers;
            
                    if (clearQueue)
                        this.queue([]);
            Severity: Major
            Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 6 hrs to fix
            app/assets/javascripts/jquery.js on lines 3927..3949

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

            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

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

                stop: function(clearQueue, gotoEnd){
                    var timers = jQuery.timers;
            
                    if (clearQueue)
                        this.queue([]);
            Severity: Major
            Found in app/assets/javascripts/jquery.js and 1 other location - About 6 hrs to fix
            app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 3019..3041

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

            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 Tree.js has 417 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*!
             * Ext JS Library 3.3.0
             * Copyright(c) 2006-2010 Ext JS, Inc.
             * licensing@extjs.com
             * http://www.extjs.com/license
            Severity: Minor
            Found in app/assets/javascripts/ext/src/data/Tree.js - About 6 hrs to fix

              TabPanel has 44 functions (exceeds 20 allowed). Consider refactoring.
              Open

              Ext.TabPanel = Ext.extend(Ext.Panel,  {
                  /**
                   * @cfg {Boolean} layoutOnTabChange
                   * Set to true to force a layout of the active tab when the tab is changed. Defaults to false.
                   * See {@link Ext.layout.CardLayout}.<code>{@link Ext.layout.CardLayout#layoutOnCardChange layoutOnCardChange}</code>.
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/TabPanel.js - About 6 hrs to fix

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

                    panTo: function(lat, lng)
                    {
                      if(Ext.isString(lat)){
                        this.geocoder.geocode({address: lat}, function(results, status){
                          this.gmap.panTo(results[0].geometry.location);
                Severity: Major
                Found in app/assets/javascripts/ext_extensions/GMapPanel.js and 1 other location - About 5 hrs to fix
                app/assets/javascripts/ext_extensions/GMapPanel.js on lines 84..96

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

                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

                    centerMap: function(lat, lng){
                      if(Ext.isString(lat)){
                        this.geocoder.geocode({address: lat}, function(results, status){
                          this.gmap.setCenter(results[0].geometry.location);
                        }.createDelegate(this));
                Severity: Major
                Found in app/assets/javascripts/ext_extensions/GMapPanel.js and 1 other location - About 5 hrs to fix
                app/assets/javascripts/ext_extensions/GMapPanel.js on lines 98..109

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

                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 doRender has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                Open

                    doRender : function(cs, rs, ds, startRow, colCount, stripe)
                    {
                        var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
                        var tstyle = 'width:'+this.getTotalWidth()+';';
                        // buffers
                Severity: Minor
                Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 5 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function doRender has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                Open

                    doRender : function(cs, rs, ds, startRow, colCount, stripe)
                    {
                        var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1;
                        var tstyle = 'width:'+this.getTotalWidth()+';';
                        // buffers
                Severity: Minor
                Found in app/assets/javascripts/ext_extensions/TreeGrid/src/GridView.js - About 5 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                File Ext.js has 411 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*!
                 * Ext JS Library 3.3.0
                 * Copyright(c) 2006-2010 Ext JS, Inc.
                 * licensing@extjs.com
                 * http://www.extjs.com/license
                Severity: Minor
                Found in app/assets/javascripts/ext/src/ext-core/src/core/Ext.js - About 5 hrs to fix

                  Function ajax has 146 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      ajax: function( s ) {
                          var jsonp, jsre = /=\?(&|$)/g, status, data;
                  
                          // Extend the settings, but re-extend 's' so that it can be
                          // checked again later (in the test suite, specifically)
                  Severity: Major
                  Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 5 hrs to fix

                    Function createToolbar has 145 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        createToolbar : function(editor){
                            var items = [];
                            var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
                    
                    
                    
                    Severity: Major
                    Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js - About 5 hrs to fix

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

                          getTemplateArgs : function(item) {
                              var cls = item.closable ? 'x-tab-strip-closable' : '';
                              if(item.disabled){
                                  cls += ' x-item-disabled';
                              }
                      Severity: Major
                      Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 5 hrs to fix
                      app/assets/javascripts/ext_extensions/VerticalTabPanel/Ext.ux.tot2ivn.VrTabPanel.js on lines 405..423

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

                      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