talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

File DomQuery.js has 653 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: Major
Found in app/assets/javascripts/ext/src/ext-core/src/core/DomQuery.js - About 1 day to fix

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

            if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
                jsonp = "jsonp" + jsc++;
    
                // Replace the =? sequence both in the query string and the data
                if ( s.data )
    Severity: Major
    Found in app/assets/javascripts/jquery.js and 1 other location - About 1 day to fix
    app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2555..2578

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

    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

            if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
                jsonp = "jsonp" + jsc++;
    
                // Replace the =? sequence both in the query string and the data
                if ( s.data )
    Severity: Major
    Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 day to fix
    app/assets/javascripts/jquery.js on lines 3420..3443

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

    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 constructor has 279 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      constructor: function(config){
        var Invitee = Ext.data.Record.create([{
          name: 'name',
          type: 'string'
        },{
    Severity: Major
    Found in app/assets/javascripts/invitations/NewInvitation.js - About 1 day to fix

      File Fx.js has 629 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: Major
      Found in app/assets/javascripts/ext/src/ext-core/src/core/Fx.js - About 1 day to fix

        Function Updater has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
        Open

        function() {
            var BEFOREUPDATE = "beforeupdate",
                UPDATE = "update",
                FAILURE = "failure";
        
        
        Severity: Minor
        Found in app/assets/javascripts/ext/src/util/UpdateManager.js - About 1 day 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 Date.js has 628 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: Major
        Found in app/assets/javascripts/ext/src/util/Date.js - About 1 day to fix

          Function Ajax has 276 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Ext.lib.Ajax = function() {
              var activeX = ['Msxml2.XMLHTTP.6.0',
                             'Msxml2.XMLHTTP.3.0',
                             'Msxml2.XMLHTTP'],
                  CONTENTTYPE = 'Content-Type';
          Severity: Major
          Found in app/assets/javascripts/ext/src/ext-core/src/adapter/ext-base-ajax.js - About 1 day to fix

            Function Ajax has 276 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Ext.lib.Ajax = function() {
                var activeX = ['Msxml2.XMLHTTP.6.0',
                               'Msxml2.XMLHTTP.3.0',
                               'Msxml2.XMLHTTP'],
                    CONTENTTYPE = 'Content-Type';
            Severity: Major
            Found in app/assets/javascripts/ext/adapter/ext/ext-base-debug.js - About 1 day to fix

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

                  var topCardNav = function(incr){
                    var l = Ext.getCmp('card-wizard-panel').getLayout();
                    var i = l.activeItem.id.split('card-')[1];
                    var next = parseInt(i, 10) + incr;
                    if(this.getFormPanel().form.isValid()) {
              Severity: Major
              Found in app/assets/javascripts/invitations/NewInvitation.js and 1 other location - About 1 day to fix
              app/assets/javascripts/invitations/NewInvitation.js on lines 199..214

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

              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

                  var bottomCardNav = function(incr){
                    var l = Ext.getCmp('card-wizard-panel').getLayout();
                    var i = l.activeItem.id.split('card-')[1];
                    var next = parseInt(i, 10) + incr;
                    if(this.getFormPanel().form.isValid()) {
              Severity: Major
              Found in app/assets/javascripts/invitations/NewInvitation.js and 1 other location - About 1 day to fix
              app/assets/javascripts/invitations/NewInvitation.js on lines 182..197

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

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

                  update : function(date, forceRefresh){
                      if(this.rendered){
                          var vd = this.activeDate, vis = this.isVisible();
                          this.activeDate = date;
                          if(!forceRefresh && vd && this.el){
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/DatePicker.js - About 1 day 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 JSON has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
              Open

              Ext.util.JSON = new (function(){
                  var useHasOwn = !!{}.hasOwnProperty,
                      isNative = function() {
                          var useNative = null;
              
              
              Severity: Minor
              Found in app/assets/javascripts/ext/src/ext-core/src/util/JSON.js - About 1 day 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

              Store has 70 functions (exceeds 20 allowed). Consider refactoring.
              Open

              Ext.data.Store = Ext.extend(Ext.util.Observable, {
                  /**
                   * @cfg {String} storeId If passed, the id to use to register with the <b>{@link Ext.StoreMgr StoreMgr}</b>.
                   * <p><b>Note</b>: if a (deprecated) <tt>{@link #id}</tt> is specified it will supersede the <tt>storeId</tt>
                   * assignment.</p>
              Severity: Major
              Found in app/assets/javascripts/ext/src/data/Store.js - About 1 day to fix

                File Ext.ux.tot2ivn.VrTabPanel.js has 595 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * @class Ext.ux.tot2ivn.VrTabPanel
                 * @version        0.2        Tested working with ExtJS 3.2+ on IE6+, FireFox 2+, Chrome 4+, Opera 9.6+, Safari 4+
                 * @author    Anh Nguyen (Totti)
                 * @description        Vertical TabPanel implements the same set of features as those of Ext.TabPanel. 

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

                      this.buttons = [
                        '->', 
                        {text: 'Save', scope: this, handler: function(){this.getForm().submit({
                          waitMsg: 'Saving...',
                          scope: this,
                  Severity: Major
                  Found in app/assets/javascripts/admin/organizations/view/New.js and 2 other locations - About 1 day to fix
                  app/assets/javascripts/forums/view/forums/New.js on lines 33..51
                  app/assets/javascripts/forums/view/topics/New.js on lines 75..93

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

                  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

                      this.buttons = [
                        '->',
                        {text: 'Save', scope: this, handler: function(){this.getForm().submit({
                          waitMsg: 'Saving...',
                          scope: this,
                  Severity: Major
                  Found in app/assets/javascripts/forums/view/forums/New.js and 2 other locations - About 1 day to fix
                  app/assets/javascripts/admin/organizations/view/New.js on lines 49..67
                  app/assets/javascripts/forums/view/topics/New.js on lines 75..93

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

                  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

                      this.buttons = [
                        '->',
                        {text: 'Save', scope: this, handler: function(){this.getForm().submit({
                          waitMsg: 'Saving...',
                          scope: this,
                  Severity: Major
                  Found in app/assets/javascripts/forums/view/topics/New.js and 2 other locations - About 1 day to fix
                  app/assets/javascripts/admin/organizations/view/New.js on lines 49..67
                  app/assets/javascripts/forums/view/forums/New.js on lines 33..51

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

                  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 Window.js has 587 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: Major
                  Found in app/assets/javascripts/ext/src/widgets/Window.js - About 1 day to fix

                    Function MenuMgr has a Cognitive Complexity of 64 (exceeds 5 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: Minor
                    Found in app/assets/javascripts/ext/src/widgets/menu/MenuMgr.js - About 1 day 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

                    Severity
                    Category
                    Status
                    Source
                    Language