talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Avoid deeply nested control flow statements.
Open

                        if(this.mouseOffset){this.mouseOffset[1] *= -1;}
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/tips/ToolTip.js - About 45 mins to fix

    Function onMouseOver has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        onMouseOver : function(e){
            if(!this.disabled){
                var internal = e.within(this.el,  true);
                if(!internal){
                    this.el.addClass('x-btn-over');
    Severity: Minor
    Found in app/assets/javascripts/ext/src/widgets/Button.js - About 45 mins 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

    Avoid deeply nested control flow statements.
    Open

                            if(this.mouseOffset){this.mouseOffset[1] *= -1;}
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/tips/ToolTip.js - About 45 mins to fix

      Function Shadow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      Ext.Shadow = function(config) {
          Ext.apply(this, config);
          if (typeof this.mode != "string") {
              this.mode = this.defaultMode;
          }
      Severity: Minor
      Found in app/assets/javascripts/ext/src/widgets/Shadow.js - About 45 mins 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

      Avoid deeply nested control flow statements.
      Open

                              if(this.mouseOffset){this.mouseOffset[0] *= -1;}
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/tips/ToolTip.js - About 45 mins to fix

        Function onClick has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            onClick : function(e){
                var t = this.findTargetItem(e);
                if(t){
                    if(t.isFormField){
                        this.setActiveItem(t);
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/menu/Menu.js - About 45 mins 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 getFrameHeight has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
        Open

            getFrameHeight : function() {
                var h  = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb');
                h += (this.tbar ? this.tbar.getHeight() : 0) +
                     (this.bbar ? this.bbar.getHeight() : 0);
        
        
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 45 mins 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 doRender has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            doRender : function(cs, rs, ds, startRow, colCount, stripe){
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/grid/GroupingView.js - About 45 mins to fix

          Function getRecordInfo has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              getRecordInfo: function(record) {
                  var dimensions = this.dimensions,
                      length  = dimensions.length,
                      data    = {},
                      dimension, dataIndex, i;
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/grid/PivotAxis.js - About 45 mins 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 initButtonEl has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              initButtonEl : function(btn, btnEl){
                  this.el = btn;
                  this.setIcon(this.icon);
                  this.setText(this.text);
                  this.setIconClass(this.iconCls);
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/Button.js - About 45 mins 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 getGroup has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/grid/GroupingView.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if(this.mouseOffset){this.mouseOffset[0] *= -1;}
            Severity: Major
            Found in app/assets/javascripts/ext/src/widgets/tips/ToolTip.js - About 45 mins to fix

              Function lookupComponent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  lookupComponent : function(c){
                       if(Ext.isString(c)){
                          c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c);
                           this.applyDefaults(c);
                       }else{
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/menu/Menu.js - About 45 mins 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 init has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  init : function() {
                      var me = this;
                      
                      // Some arrays we are going to store data in
                      this.values = [];
              Severity: Minor
              Found in app/assets/javascripts/ext/src/ext-core/examples/rating/rating.js - About 45 mins 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 onClick has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  onClick : function(e){
                      if(e){
                          e.preventDefault();
                      }
                      if(e.button !== 0){
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/Button.js - About 45 mins 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

              Avoid deeply nested control flow statements.
              Open

                                      if (Ext.isIE) {
                                          this.bbar.setStyle('position', 'static');
                                          this.bbar.setStyle('position', '');
                                      }
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if (p != el && !pe.isStyle('overflow','visible')) {
                                                x += bl;
                                                y += bt;
                                            }
                Severity: Major
                Found in app/assets/javascripts/ext/src/ext-core/src/adapter/ext-base-dom.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if(cj.nodeName == utag || cj.nodeName == tagName  || tagName == '*'){
                                          result[++ri] = cj;
                                      }
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/ext-core/src/core/DomQuery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){
                                        result[++ri] = n;
                                    }
                    Severity: Major
                    Found in app/assets/javascripts/ext/src/ext-core/src/core/DomQuery.js - About 45 mins to fix

                      Function scroll has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              scroll : function(el, args, duration, easing, cb, scope){
                      Severity: Minor
                      Found in app/assets/javascripts/ext/adapter/jquery/ext-jquery-adapter-debug.js - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language