talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function constructor has 90 lines of code (exceeds 25 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: Major
Found in app/assets/javascripts/ext/src/data/Store.js - About 3 hrs to fix

    Function onRender has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        onRender : function(ct, position){
            if(!this.el){
                var panelCfg = {
                    autoEl: {
                        id: this.id
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js - About 3 hrs to fix

      Function AnimMgr has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Ext.lib.AnimMgr = new function() {
              var me = this,
                  thread = null,
                  queue = [],
                  tweenCount = 0;
      Severity: Major
      Found in app/assets/javascripts/ext/src/ext-core/src/adapter/ext-base-anim.js - About 3 hrs to fix

        Function AnimMgr has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Ext.lib.AnimMgr = new function() {
                var me = this,
                    thread = null,
                    queue = [],
                    tweenCount = 0;
        Severity: Major
        Found in app/assets/javascripts/ext/adapter/ext/ext-base-debug.js - About 3 hrs to fix

          Function save has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              save : function() {
                  if (!this.writer) {
                      throw new Ext.data.Store.Error('writer-undefined');
                  }
          
          
          Severity: Minor
          Found in app/assets/javascripts/ext/src/data/Store.js - About 3 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 processEvent has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              processEvent : function(name, e) {
                  var target = e.getTarget(),
                      grid   = this.grid,
                      header = this.findHeaderIndex(target),
                      row, cell, col, body;
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 3 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 autoScrollTabs has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              autoScrollTabs : function(){
                  this.pos = this.tabPosition=='bottom' ? this.footer : this.header;
                  var count = this.items.length,
                      ow = this.pos.dom.offsetWidth,
                      tw = this.pos.dom.clientWidth,
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/TabPanel.js - About 3 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 fitToSize has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              fitToSize : function(target) {
                  if (this.container.enableOverflow === false) {
                      return;
                  }
          
          
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/layout/ToolbarLayout.js - About 3 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 autoScrollTabs has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              autoScrollTabs : function(){
                  this.pos = this.tabPosition=='bottom' ? this.footer : this.header;
                  var count = this.items.length,
                      ow = this.pos.dom.offsetHeight,
                      tw = this.pos.dom.clientHeight,

          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

          Method update has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

            def update   
              if (current_user.is_admin? || current_user.moderator_of?(@forum) || current_user.forum_owner_of?(@forum))
                @forum = Forum.for_user(current_user).find(params[:id], :readonly => false)
                merge_if(params[:forum][:audience_attributes],{:owner_id=>current_user.id})      
            
          Severity: Minor
          Found in app/controllers/forums_controller.rb - About 3 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 BasicForm.js has 314 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/form/BasicForm.js - About 3 hrs to fix

            ToolTip has 29 functions (exceeds 20 allowed). Consider refactoring.
            Open

            Ext.ToolTip = Ext.extend(Ext.Tip, {
                /**
                 * When a Tooltip is configured with the <code>{@link #delegate}</code>
                 * option to cause selected child elements of the <code>{@link #target}</code>
                 * Element to each trigger a seperate show event, this property is set to
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/tips/ToolTip.js - About 3 hrs to fix

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

                       bbar: {
                         items: [
                           {text: 'Add Source', scope: this, handler: function(){
                             var grid = win.getComponent('grid'),
                                 store = grid.getStore();
              Severity: Major
              Found in app/assets/javascripts/dashboard/cms/portlets/rss.js and 1 other location - About 3 hrs to fix
              app/assets/javascripts/dashboard/cms/portlets/forum.js on lines 146..155

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

              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

                       bbar: {
                         items: [
                           {text: 'Add Source', scope: this, handler: function(){
                             var grid = win.getComponent('grid'),
                                 store = grid.getStore();
              Severity: Major
              Found in app/assets/javascripts/dashboard/cms/portlets/forum.js and 1 other location - About 3 hrs to fix
              app/assets/javascripts/dashboard/cms/portlets/rss.js on lines 101..110

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

              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 6 locations. Consider refactoring.
              Open

              if(Ext.DatePicker){
                 Ext.apply(Ext.DatePicker.prototype, {
                    todayText         : "Данас",
                    minText           : "Датум је испред најмањег дозвољеног датума",
                    maxText           : "Датум је након највећег дозвољеног датума",
              Severity: Major
              Found in app/assets/javascripts/ext/src/locale/ext-lang-sr_RS.js and 5 other locations - About 3 hrs to fix
              app/assets/javascripts/ext/src/locale/ext-lang-af.js on lines 83..99
              app/assets/javascripts/ext/src/locale/ext-lang-lv.js on lines 76..92
              app/assets/javascripts/ext/src/locale/ext-lang-sl.js on lines 76..92
              app/assets/javascripts/ext/src/locale/ext-lang-sr.js on lines 78..94
              app/assets/javascripts/ext/src/locale/ext-lang-sv_SE.js on lines 78..94

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

              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

                      add: function( elem, classNames ) {
                          jQuery.each((classNames || "").split(/\s+/), function(i, className){
                              if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
                                  elem.className += (elem.className ? " " : "") + className;
                          });
              Severity: Major
              Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 3 hrs to fix
              app/assets/javascripts/jquery.js on lines 711..716

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

              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

                                                  else{
                                                      this.getComponent('tp').getComponent('sh').getComponent('ap').disable();
                                                      this.getComponent('tp').getComponent('per').getComponent('perholder').hide();
                                                      this.getComponent('tp').getComponent('per').getComponent('perlabel').show();
                                                  }
              Severity: Major
              Found in app/assets/javascripts/documents/AddEditFolderWindow.js and 1 other location - About 3 hrs to fix
              app/assets/javascripts/documents/AddEditFolderWindow.js on lines 87..91

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

              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 6 locations. Consider refactoring.
              Open

              if(Ext.DatePicker){
                 Ext.apply(Ext.DatePicker.prototype, {
                    todayText         : "Danes",
                    minText           : "Navedeni datum je pred spodnjim datumom",
                    maxText           : "Navedeni datum je za zgornjim datumom",
              Severity: Major
              Found in app/assets/javascripts/ext/src/locale/ext-lang-sl.js and 5 other locations - About 3 hrs to fix
              app/assets/javascripts/ext/src/locale/ext-lang-af.js on lines 83..99
              app/assets/javascripts/ext/src/locale/ext-lang-lv.js on lines 76..92
              app/assets/javascripts/ext/src/locale/ext-lang-sr.js on lines 78..94
              app/assets/javascripts/ext/src/locale/ext-lang-sr_RS.js on lines 78..94
              app/assets/javascripts/ext/src/locale/ext-lang-sv_SE.js on lines 78..94

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

              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

                      add: function( elem, classNames ) {
                          jQuery.each((classNames || "").split(/\s+/), function(i, className){
                              if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
                                  elem.className += (elem.className ? " " : "") + className;
                          });
              Severity: Major
              Found in app/assets/javascripts/jquery.js and 1 other location - About 3 hrs to fix
              app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 747..752

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

              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(checked){
                                                      this.getComponent('tp').getComponent('sh').getComponent('ap').enable();
                                                      this.getComponent('tp').getComponent('per').getComponent('perlabel').hide();
                                                      this.getComponent('tp').getComponent('per').getComponent('perholder').show();
                                                  }
              Severity: Major
              Found in app/assets/javascripts/documents/AddEditFolderWindow.js and 1 other location - About 3 hrs to fix
              app/assets/javascripts/documents/AddEditFolderWindow.js on lines 92..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 105.

              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