GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

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

  loop: function(timePos) {
    if (timePos >= this.startOn) {
      if (timePos >= this.finishOn) {
        this.render(1.0);
        this.cancel();
Severity: Minor
Found in Src/scripts/effects.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 nn = n.nextSibling; nn; nn = nn.nextSibling) {
        nodelist.push(nn);
        xpathCollectDescendants(nodelist, nn);
      }
Severity: Major
Found in Src/scripts/xpath.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

            if (cmp(s, nn)) {
              ret = true;
              break;
            }
    Severity: Major
    Found in Src/scripts/xpath.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

          } else if (stack[s].tag == pattern[p]) {
            match.push(stack[s]);
            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

                                if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
                                    fixParams(obj);
                                }
        Severity: Major
        Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (l != "movie") { // Filter out IE specific param element
                                  e.setAttribute(l, parObj[l]);
                              }
          Severity: Major
          Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          for(attr in arguments[1])
                            element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
            Severity: Major
            Found in Src/scripts/builder.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if (k == "data") {
                                      e.setAttribute("src", attObj[k]);
                                  }
                                  else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                      e.setAttribute("class", attObj[k]);
              Severity: Major
              Found in Src/scripts/swfobject_modified.js - About 45 mins to fix

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

                UnionExpr.prototype.evaluate = function(ctx) {
                  var nodes1 = this.expr1.evaluate(ctx).nodeSetValue();
                  var nodes2 = this.expr2.evaluate(ctx).nodeSetValue();
                  var I1 = nodes1.length;
                  for (var i2 = 0; i2 < nodes2.length; ++i2) {
                Severity: Minor
                Found in Src/scripts/xpath.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

                    } else if (v1.type == 'string') {
                      var s = v1.stringValue();
                      var n = v2.nodeSetValue();
                
                      ret = false;
                Severity: Major
                Found in Src/scripts/xpath.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                    } else if (this.axis == xpathAxis.NAMESPACE) {
                      alert('not implemented: axis namespace');
                  
                    } else if (this.axis == xpathAxis.PARENT) {
                      if (input.parentNode) {
                  Severity: Major
                  Found in Src/scripts/xpath.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                          for (var i = 0;  i < n.length; ++i) {
                            var nn = xmlValue(n[i]) - 0;
                            if (cmp(nn, s)) {
                              ret = true;
                              break;
                    Severity: Major
                    Found in Src/scripts/xpath.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if (a_l_c > b_l_c)
                                              return 1;
                                          else if (a_l_c < b_l_c)
                                              return -1;
                                          else if (a_c > b_c)
                      Severity: Major
                      Found in Src/scripts/sprydata.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if (attr && attr.nodeType == 2 /* Node.ATTRIBUTE_NODE */)
                                                    obj[namePrefix + attr.name] = attr.value;
                        Severity: Major
                        Found in Src/scripts/sprydata.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (!lastEndComment)
                                                              node.appendChild(cComment);
                                                          else
                                                              node.insertBefore(cComment, lastEndComment);
                          Severity: Major
                          Found in Src/scripts/sprydata.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            if (childToProcess)
                                                this.processTokenChildren(outputArr, childToProcess, processContext);
                            Severity: Major
                            Found in Src/scripts/sprydata.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                              for (j = 0; j < token.children.length; j++)
                                              {
                                                  var child = token.children[j];
                                                  if (child.tokenType == Spry.Data.Region.Token.PROCESSING_INSTRUCTION_TOKEN)
                                                  {
                              Severity: Major
                              Found in Src/scripts/sprydata.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if (pdsc) pdsc.addChild(dsc);
                                Severity: Major
                                Found in Src/scripts/sprydata.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if (tagAttrs.charAt(endIndex) == tagAttrs.charAt(savedIndex))
                                                      {
                                                          endIndex++;
                                                          break;
                                                      }
                                  Severity: Major
                                  Found in Src/scripts/sprydata.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if (hashStr)
                                                            hashStr += ",";
                                    Severity: Major
                                    Found in Src/scripts/sprydata.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language