GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 605 of 605 total issues

Avoid deeply nested control flow statements.
Open

                    if ( !anyFound ) {
                        return [];
                    }
Severity: Major
Found in Src/scripts/prototype.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if(group == this.lastDateGroup) 
                        {
                            this.redTextFlash(); return false;
                        }
                        else 
    Severity: Major
    Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if (pressed == autocomplete) 
                          {
                              if (this.nextDateDelimiterExists(this.oldValue, this.selection.start, group))
                              {
                                  futureValue = this.oldValue;
      Severity: Major
      Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

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

                ATTR: function(match, curLoop, inplace, result, not, isXML){
        Severity: Minor
        Found in Src/scripts/prototype.js - About 45 mins to fix

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

          function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
          Severity: Minor
          Found in Src/scripts/prototype.js - About 45 mins to fix

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

              updateContent: function(responseText) {
                var receiver = this.container[this.success() ? 'success' : 'failure'],
                    options = this.options;
            
                if (!options.evalScripts) responseText = responseText.stripScripts();
            Severity: Minor
            Found in Src/scripts/prototype.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 ( typeof cur !== "string" ) {
                                    if ( elem === cur ) {
                                        match = true;
                                        break;
                                    }
            Severity: Major
            Found in Src/scripts/prototype.js - About 45 mins to fix

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

              Spry.Widget.ValidationTextField.prototype.getAutoComplete = function(from, direction) {
                  if (direction == -1) {
                      var n = '', m = '';
                      while(from && (n = this.getAutoComplete(--from) )) {
                          m = n;
              Severity: Minor
              Found in Src/scripts/spryvalidationtextfield.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

                                  for (var sel_end = 0; range_all.compareEndPoints('StartToEnd', range) < 0; sel_end++){
                                      range_all.moveStart('character', 1);
                                  }
              Severity: Major
              Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

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

                Spry.Widget.ValidationTextField.prototype.init = function(element, options)
                {
                    this.element = this.getElement(element);
                    this.errors = 0;
                    this.flags = {locked: false, restoreSelection: true};
                Severity: Minor
                Found in Src/scripts/spryvalidationtextfield.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

                                    for (var sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start ++){
                                        range_all.moveStart('character', 1);
                                    }
                Severity: Major
                Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                            if (Element.getStyle(element, 'position') == 'absolute') break;
                  Severity: Major
                  Found in Src/scripts/prototype.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if ( !match ) {
                                            anyFound = found = true;
                                        } else if ( match === true ) {
                                            continue;
                                        }
                    Severity: Major
                    Found in Src/scripts/prototype.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
                                              if ( item ) {
                                                  found = filter( item, match, i, curLoop );
                                                  var pass = not ^ !!found;
                      
                      
                      Severity: Major
                      Found in Src/scripts/prototype.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if (out >= max_out) {
                                                return false;
                                            }
                        Severity: Major
                        Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                    if (node.tagName !== "!") // Filter out comment nodes.
                                      results.push(node);
                          Severity: Major
                          Found in Src/scripts/prototype.js - About 45 mins to fix

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

                            Spry.Widget.Utils.contains = function (who, what)
                            {
                                if (typeof who.contains == 'object') {
                                    return what && who && (who == what || who.contains(what));
                                } else {
                            Severity: Minor
                            Found in Src/scripts/spryvalidationtextfield.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

                                for (var n = input.nextSibling; n; n = n.nextSibling) {
                                  nodelist.push(n);
                                }
                            Severity: Major
                            Found in Src/scripts/xpath.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                    if (stack[s].tag == pattern[p]) {
                                      while (s - ds >= 0 && stack[s - ds].tag == pattern[p]) {
                                        qmatch.push(stack[s - ds]);
                                        ds += 1;
                                        match.matchlength += 1;
                              Severity: Major
                              Found in Src/scripts/xpath.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
                                                        showExpressInstall(regObjArr[i]);
                                                    }
                                                    else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
                                                        displayAltContent(obj);
                                Severity: Major
                                Found in Src/scripts/swfobject_modified.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language