talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function Api has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Ext.data.Api = (function() {

    // private validActions.  validActions is essentially an inverted hash of Ext.data.Api.actions, where value becomes the key.
    // Some methods in this singleton (e.g.: getActions, getVerb) will loop through actions with the code <code>for (var verb in this.actions)</code>
    // For efficiency, some methods will first check this hash for a match.  Those methods which do acces validActions will cache their result here.
Severity: Major
Found in app/assets/javascripts/ext/src/data/Api.js - About 4 hrs to fix

    Function onLayout has 105 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        onLayout : function(ct, target){
            var collapsed, i, c, pos, items = ct.items.items, len = items.length;
            if(!this.rendered){
                collapsed = [];
                for(i = 0; i < len; i++) {
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/layout/BorderLayout.js - About 4 hrs to fix

      Function WindowGroup has 105 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Ext.WindowGroup = function(){
          var list = {};
          var accessList = [];
          var front = null;
      
      
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/WindowManager.js - About 4 hrs to fix

        Function find has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            find: function( t, context ) {
                // Quickly handle non-string expressions
                if ( typeof t != "string" )
                    return [ t ];
        
        
        Severity: Major
        Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 4 hrs to fix

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

                  for(var i = 0, len = d.length; i < len; i++){
                      v = d[i].data[dataIndex];
                      sv = String(v);
                      if((allowNull || !Ext.isEmpty(v)) && !l[sv]){
                          l[sv] = true;
          Severity: Major
          Found in app/assets/javascripts/ext/src/data/Store.js and 1 other location - About 4 hrs to fix
          app/assets/javascripts/ext_extensions/PagingStore.js on lines 330..337

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

          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

                  for (var i = 0, len = d.length; i < len; i++) {
                      v = d[i].data[dataIndex];
                      sv = String(v);
                      if ((allowNull || !Ext.isEmpty(v)) && !l[sv]) {
                          l[sv] = true;
          Severity: Major
          Found in app/assets/javascripts/ext_extensions/PagingStore.js and 1 other location - About 4 hrs to fix
          app/assets/javascripts/ext/src/data/Store.js on lines 1848..1855

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

          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 MessageBox.js has 341 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/MessageBox.js - About 4 hrs to fix

            `` has 33 functions (exceeds 20 allowed). Consider refactoring.
            Open

            Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
            
                /**
                 * @cfg {Boolean} allowFunctions Specify <tt>true</tt> if the {@link #addAll}
                 * function should add function references to the collection. Defaults to
            Severity: Minor
            Found in app/assets/javascripts/ext/src/util/MixedCollection.js - About 4 hrs to fix

              Node has 33 functions (exceeds 20 allowed). Consider refactoring.
              Open

              Ext.data.Node = Ext.extend(Ext.util.Observable, {
                  
                  constructor: function(attributes){
                      /**
                       * The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
              Severity: Minor
              Found in app/assets/javascripts/ext/src/data/Tree.js - About 4 hrs to fix

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

                          {xtype: 'container', layout: 'form', labelAlign: 'top', defaults:{width:400}, items:[
                          {xtype: 'textfield', inputType: 'password', fieldLabel: 'Password', name: 'user[password]', maxLength: '46', allowBlank: true, itemId: 'initialPass', vtype: 'password'},
                          {xtype: 'textfield', inputType: 'password', fieldLabel: 'Confirm password', name: 'user[password_confirmation]', maxLength: '46', allowBlank: true, initialPassword: 'initialPass', vtype: 'password'}
                        ]},
                Severity: Major
                Found in app/assets/javascripts/profile/EditProfile.js and 1 other location - About 4 hrs to fix
                app/assets/javascripts/profile/EditPassword.js on lines 6..9

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

                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

                      {xtype: 'container', layout: 'form', labelAlign: 'top', defaults:{width:400}, items:[
                        {xtype: 'textfield', inputType: 'password', fieldLabel: 'Password', name: 'user[password]', maxLength: '46', allowBlank: false, itemId: 'initialPass', vtype: 'password'},
                        {xtype: 'textfield', inputType: 'password', fieldLabel: 'Confirm password', name: 'user[password_confirmation]', maxLength: '46', allowBlank: false, initialPassword: 'initialPass', vtype: 'password'}
                      ]}
                Severity: Major
                Found in app/assets/javascripts/profile/EditPassword.js and 1 other location - About 4 hrs to fix
                app/assets/javascripts/profile/EditProfile.js on lines 42..45

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

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

                Ext.ns('Talho');
                
                Talho.FindPeople = Ext.extend(Ext.util.Observable, {
                  constructor: function(config){
                    Talho.FindPeople.superclass.constructor.call(this, config);
                Severity: Minor
                Found in app/assets/javascripts/search/FindPeople.js - About 4 hrs to fix

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

                      setMinValue : function(val){
                          this.minValue = val;
                          var i = 0,
                              thumbs = this.thumbs,
                              len = thumbs.length,
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Slider.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/ext/src/widgets/Slider.js on lines 643..655

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

                  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

                                      v += '<img alt="' + me.altText + '" src="' + (item.icon || Ext.BLANK_IMAGE_URL) +
                                          '" class="x-action-col-icon x-action-col-' + String(i) + ' ' + (item.iconCls || '') +
                                          ' ' + (Ext.isFunction(item.getClass) ? item.getClass.apply(item.scope||this.scope||this, arguments) : '') + '"' +
                                          ((item.width) ? ' width="' + (!cfg.items ? item.width - me.widthExtra : item.width) + '"' : '') +
                  Severity: Major
                  Found in app/assets/javascripts/ext_extensions/xActionColumn.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/ext/src/widgets/grid/Column.js on lines 617..620

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

                  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

                      setMaxValue : function(val){
                          this.maxValue = val;
                          var i = 0,
                              thumbs = this.thumbs,
                              len = thumbs.length,
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Slider.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/ext/src/widgets/Slider.js on lines 624..636

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

                  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

                                  v += '<img alt="' + me.altText + '" src="' + (item.icon || Ext.BLANK_IMAGE_URL) +
                                      '" class="x-action-col-icon x-action-col-' + String(i) + ' ' + (item.iconCls || '') +
                                      ' ' + (Ext.isFunction(item.getClass) ? item.getClass.apply(item.scope||this.scope||this, arguments) : '') + '"' +
                                      ((item.tooltip) ? ' ext:qtip="' + item.tooltip + '"' : '') + ' />';
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/grid/Column.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/ext_extensions/xActionColumn.js on lines 151..154

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

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

                  //= require ext_extensions/xActionColumn
                  //= require ext_extensions/DoNotCollapseActive
                  //= require ./GroupSelectionGrid
                  //= require ./JurisdictionsTree
                  //= require ./RoleSelectionGrid
                  Severity: Minor
                  Found in app/assets/javascripts/audience/AudiencePanel.js - About 4 hrs to fix

                    Function constructor has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                    Open

                        constructor: function(config){
                            this.addEvents('foldercreated');
                    
                            var cb = Ext.extend(Ext.form.Checkbox, {
                                anchor: '100%',
                    Severity: Minor
                    Found in app/assets/javascripts/documents/AddEditFolderWindow.js - About 4 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 XTemplate has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Ext.XTemplate = function(){
                        Ext.XTemplate.superclass.constructor.apply(this, arguments);
                    
                        var me = this,
                            s = me.html,
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/util/XTemplate.js - About 4 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 constructor has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                    Open

                        constructor : function(config){
                            /**
                             * @property multiSort
                             * @type Boolean
                             * True if this store is currently sorted by more than one field/direction combination.
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/data/Store.js - About 4 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

                    Severity
                    Category
                    Status
                    Source
                    Language