talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Avoid deeply nested control flow statements.
Open

                        if(prop == "style" && currentSeries.style !== null){
                            clonedSeries.style = Ext.encode(currentSeries.style);
                            styleChanged = true;
                            //we don't want to modify the styles again next time
                            //so null out the style property.
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/chart/Chart.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
                                ac.appendChild(c[i].cloneNode(true));
                            }
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/chart/swfobject.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
                                  setVisibility(id, true);
                                  if (cb) {
                                      cbObj.success = true;
                                      cbObj.ref = getObjectById(id);
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/chart/swfobject.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (o && typeof o.SetVariable != UNDEF) { 
                                    cbObj.success = true;
                                    cbObj.ref = o;
                                }
        Severity: Major
        Found in app/assets/javascripts/ext/src/widgets/chart/swfobject.js - About 45 mins to fix

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

              clearInvalid : function(){
                  //don't remove the error icon if we're not rendered or marking is prevented
                  if (this.rendered && !this.preventMark) {
                      this.el.removeClass(this.invalidClass);
                      var mt = this.getMessageHandler();
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/form/Field.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(vis && !this.cancelFocus){
                                         Ext.fly(c.dom.firstChild).focus(50);
                                     }
          Severity: Major
          Found in app/assets/javascripts/ext/src/widgets/DatePicker.js - About 45 mins to fix

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

                handleResponse : function(response){
                    if(this.form.errorReader){
                        var rs = this.form.errorReader.read(response);
                        var errors = [];
                        if(rs.records){
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/form/Action.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 beforeAction has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                beforeAction : function(action){
                    // Call HtmlEditor's syncValue before actions
                    this.items.each(function(f){
                        if(f.isFormField && f.syncValue){
                            f.syncValue();
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/form/BasicForm.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(f){
                                    f.setValue(id[i]);
                                }
            Severity: Major
            Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js - About 45 mins to fix

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

                  toggleSourceEdit : function(sourceEditMode){
                      var iframeHeight,
                          elHeight;
              
                      if (sourceEditMode === undefined) {
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.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.items[i].fieldLabel){
                                          this.items[i].hideLabel = false;
                                      }
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if(this.items[i].fieldLabel){
                                            this.items[i].hideLabel = false;
                                        }
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if(!target || target.tagName.toLowerCase() != 'li'){
                                              e.stopEvent();
                                              r.pasteHTML('<br />');
                                              r.collapse(false);
                                              r.select();
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js - About 45 mins to fix

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

                        pushValue : function(){
                            if(this.initialized){
                                var v = this.el.dom.value;
                                if(!this.activated && v.length < 1){
                                    v = this.defaultValue;
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.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 onMonthClick has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        onMonthClick : function(e, t){
                            e.stopEvent();
                            var el = new Ext.Element(t), pn;
                            if(el.is('button.x-date-mp-cancel')){
                                this.hideMonthPicker();
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/DatePicker.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 updateEditState has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        updateEditState: function(){
                            if(this.rendered){
                                if (this.readOnly) {
                                    this.el.dom.readOnly = true;
                                    this.el.addClass('x-trigger-noedit');
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/form/TriggerField.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 syncValue has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        syncValue : function(){
                            if(this.initialized){
                                var bd = this.getEditorBody();
                                var html = bd.innerHTML;
                                if(Ext.isWebKit){
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.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 reset has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        reset : function(){
                            if (this.originalValue) {
                                // Clear all items
                                this.eachItem(function(c){
                                    if(c.setValue){
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.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 onRender has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        onRender : function(ct, position){
                            if(!this.el){
                                this.el = document.createElement('fieldset');
                                this.el.id = this.id;
                                if (this.title || this.header || this.checkboxToggle) {
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/form/FieldSet.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(i>0 && i%rows==0){
                                                ri++;
                                            }
                    Severity: Major
                    Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js - About 45 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language