talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

    onLayout : function(container, target) {
        Ext.layout.AnchorLayout.superclass.onLayout.call(this, container, target);

        var size = this.getLayoutTargetSize(),
            containerWidth = size.width,
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/layout/AnchorLayout.js - About 2 hrs to fix

    Function handleAJAXLoad has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        handleAJAXLoad: function(el, success, response, options)
        {
            if(!success)
            {
                (new Ext.Window({title: 'Error', html: response.responseText})).show();
    Severity: Major
    Found in app/assets/javascripts/ext_extensions/AjaxPanel.js - About 2 hrs to fix

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

          getVMaxSize : function(){
              var cmax = this.maxSize || 10000;
              var center = this.layout.center;
              return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight());
          },
      app/assets/javascripts/ext/src/widgets/layout/BorderLayout.js on lines 1107..1111

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

      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

          getHMaxSize : function(){
               var cmax = this.maxSize || 10000;
               var center = this.layout.center;
               return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth());
          },
      app/assets/javascripts/ext/src/widgets/layout/BorderLayout.js on lines 1114..1118

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

      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 ext-lang-ru.js has 283 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/locale/ext-lang-ru.js - About 2 hrs to fix

        Function initComponent has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            initComponent : function(){
                var pagingItems = [this.first = new T.Button({
                    tooltip: this.firstText,
                    overflowText: this.firstText,
                    iconCls: 'x-tbar-page-first',
        Severity: Major
        Found in app/assets/javascripts/ext/src/widgets/PagingToolbar.js - About 2 hrs to fix

          Function show has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  show : function(options){
                      if(this.isVisible()){
                          this.hide();
                      }
                      opt = options;
          Severity: Major
          Found in app/assets/javascripts/ext/src/widgets/MessageBox.js - About 2 hrs to fix

            Function renderCellTreeUI has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                renderCellTreeUI : function(record, store)
                {
                    var tpl = this.templates.treeui,
                        line_tpl = this.templates.elbow_line,
                        tpl_data = {},
            Severity: Major
            Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 2 hrs to fix

              Function renderCellTreeUI has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  renderCellTreeUI : function(record, store)
                  {
                      var tpl = this.templates.treeui,
                          line_tpl = this.templates.elbow_line,
                          tpl_data = {},
              Severity: Major
              Found in app/assets/javascripts/ext_extensions/TreeGrid/src/GridView.js - About 2 hrs to fix

                Function filter has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    filter: function(t,r,not) {
                        var last;
                
                        // Look for common filter expressions
                        while ( t && t != last ) {
                Severity: Major
                Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 2 hrs to fix

                  Function sort has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      sort : function(fieldName, dir) {
                          if (this.remoteSort) {
                              return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir);
                          }
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/data/GroupingStore.js - About 2 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 select has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      select : function(nodeInfo, keepExisting, suppressEvent){
                          if(Ext.isArray(nodeInfo)){
                              if(!keepExisting){
                                  this.clearSelections(true);
                              }
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/DataView.js - About 2 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 onLoad has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      onLoad : function(){
                          if(!this.hasFocus){
                              return;
                          }
                          if(this.store.getCount() > 0 || this.listEmptyText){
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/form/Combo.js - About 2 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 setValues has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      setValues : function(values){
                          if(Ext.isArray(values)){ // array of objects
                              for(var i = 0, len = values.length; i < len; i++){
                                  var v = values[i];
                                  var f = this.findField(v.id);
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/form/BasicForm.js - About 2 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 onRender has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      onRender : function(container, position){
                          var m = [
                               '<table cellspacing="0">',
                                  '<tr><td class="x-date-left"><a href="#" title="', this.prevText ,'">&#160;</a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="', this.nextText ,'">&#160;</a></td></tr>',
                                  '<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>'],
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/DatePicker.js - About 2 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 onMouseMove has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      onMouseMove : function(e){
                          if(this.enabled && this.activeHandle){
                              try{// try catch so if something goes wrong the user doesn't get hung
                  
                              if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) {
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Resizable.js - About 2 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 handleKeyDown has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      handleKeyDown : function(e){
                          if(!e.isNavKeyPress()){
                              return;
                          }
                          
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/grid/CellSelectionModel.js - About 2 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 startEditing has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      startEditing: function(rowIndex, doFocus){
                          if(this.editing && this.isDirty()){
                              this.showTooltip(this.commitChangesText);
                              return;
                          }
                  Severity: Minor
                  Found in app/assets/javascripts/ext_extensions/RowEditor.js - About 2 hrs to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                      hideTabStripItem : function(item){
                          item = this.getComponent(item);
                          var el = this.getTabEl(item);
                          if(el){
                              el.style.display = 'none';
                  app/assets/javascripts/ext/src/widgets/TabPanel.js on lines 718..726

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

                  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

                      hideTabStripItem : function(item){
                          item = this.getComponent(item);
                          var el = this.getTabEl(item);
                          if(el){
                              el.style.display = 'none';
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/ext_extensions/VerticalTabPanel/Ext.ux.tot2ivn.VrTabPanel.js on lines 563..571

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

                  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