talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

    addComponentToMenu : function(menu, component) {
        if (component instanceof Ext.Toolbar.Separator) {
            menu.add('-');

        } else if (Ext.isFunction(component.isXType)) {
app/assets/javascripts/ext/src/widgets/layout/ToolbarLayout.js on lines 322..339

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

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

    addComponentToMenu : function(menu, component) {
        if (component instanceof Ext.Toolbar.Separator) {
            menu.add('-');

        } else if (Ext.isFunction(component.isXType)) {
app/assets/javascripts/ext/src/widgets/layout/box/MenuOverflow.js on lines 168..185

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

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

Ext.util.CSS = function(){
    var rules = null;
       var doc = document;

    var camelRe = /(-[a-z])/gi;
Severity: Minor
Found in app/assets/javascripts/ext/src/util/CSS.js - About 7 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

Method get_version has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
Open

  def get_version(id)
    if allowed_to_see(id)
      req_ver = Version.find(id)
      req_rec = reify_and_get_attrs(req_ver)
      req_rec = req_ver.item_type.constantize.new.attributes if req_rec.nil?
Severity: Minor
Found in app/controllers/audits_controller.rb - About 7 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

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

        mouseleave: {
            setup: function() {
                if ( jQuery.browser.msie ) return false;
                jQuery(this).bind("mouseout", jQuery.event.special.mouseleave.handler);
                return true;
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 7 hrs to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2137..2157

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

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

        mouseenter: {
            setup: function() {
                if ( jQuery.browser.msie ) return false;
                jQuery(this).bind("mouseover", jQuery.event.special.mouseenter.handler);
                return true;
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 7 hrs to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2159..2179

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

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 TreeNodeUI.js has 489 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/tree/TreeNodeUI.js - About 7 hrs to fix

    Panel has 54 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Ext.Panel = Ext.extend(Ext.Container, {
        /**
         * The Panel's header {@link Ext.Element Element}. Read-only.
         * <p>This Element is used to house the {@link #title} and {@link #tools}</p>
         * <br><p><b>Note</b>: see the Note for <code>{@link Ext.Component#el el}</code> also.</p>
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 7 hrs to fix

      File jquery-bridge.js has 483 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/adapter/jquery-bridge.js - About 7 hrs to fix

        File Resizable.js has 483 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/Resizable.js - About 7 hrs to fix

          Function Format has 187 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Ext.util.Format = function() {
              var trimRe         = /^\s+|\s+$/g,
                  stripTagsRE    = /<\/?[^>]+>/gi,
                  stripScriptsRe = /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
                  nl2brRe        = /\r?\n/g;
          Severity: Major
          Found in app/assets/javascripts/ext/src/util/Format.js - About 7 hrs to fix

            File Menu.js has 478 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/menu/Menu.js - About 7 hrs to fix

              Function _setFileControlsState has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
              Open

                  _setFileControlsState: function(control){
                      if(!this._fileControls){
                          this._fileControls = this.getPanel().getComponent('file_grid_holder').getComponent('file_icon_holder').getComponent('file_controls');
                      }
                      if(!this._add_folder_button){
              Severity: Minor
              Found in app/assets/javascripts/documents/Documents.js - About 7 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 Slider.js has 473 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/Slider.js - About 7 hrs to fix

                File RowEditor.js has 469 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_extensions/RowEditor.js - About 7 hrs to fix

                  Function onRender has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                  Open

                      onRender : function(ct, position){
                          Ext.Panel.superclass.onRender.call(this, ct, position);
                          this.createClasses();
                  
                          var el = this.el,
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 7 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

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

                      text: function( text ) {
                          if ( typeof text != "object" && text != null )
                              return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
                  
                          var ret = "";
                  Severity: Major
                  Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 7 hrs to fix
                  app/assets/javascripts/jquery.js on lines 201..217

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

                  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

                      text: function( text ) {
                          if ( typeof text !== "object" && text != null )
                              return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
                  
                          var ret = "";
                  Severity: Major
                  Found in app/assets/javascripts/jquery.js and 1 other location - About 7 hrs to fix
                  app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 205..221

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

                  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

                  Ext.TabPanel.AccessStack = function(){
                      var items = [];
                      return {
                          add : function(item){
                              items.push(item);
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 6 hrs to fix
                  app/assets/javascripts/ext_extensions/VerticalTabPanel/Ext.ux.tot2ivn.VrTabPanel.js on lines 981..1005

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

                  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

                  Ext.ux.tot2ivn.VrTabPanel.AccessStack = function(){
                      var items = [];
                      return {
                          add : function(item){
                              items.push(item);
                  app/assets/javascripts/ext/src/widgets/TabPanel.js on lines 1108..1132

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

                  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