GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Function xpathSort has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function xpathSort(input, sort) {
  if (sort.length == 0) {
    return;
  }

Severity: Minor
Found in Src/scripts/xpath.js - About 55 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 removeAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Utils.removeAttribute = function(ele, name)
{
    ele = Spry.$(ele);
    if (!ele || !name)
        return;
Severity: Minor
Found in Src/scripts/sprydata.js - About 55 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 getSortFunc has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.DataSet.prototype.sort.getSortFunc = function(prop, type, order)
{
    var sortfunc = null;
    if (type == "number")
    {
Severity: Minor
Found in Src/scripts/sprydata.js - About 55 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 loadURL has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Utils.loadURL = function(method, url, async, callback, opts)
{
    var req = new Spry.Utils.loadURL.Request();
    req.method = method;
    req.url = url;
Severity: Minor
Found in Src/scripts/sprydata.js - About 55 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 getDataSetContext has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.Region.ProcessingContext.prototype.getDataSetContext = function(dataSet)
{
    if (!dataSet)
    {
        // We were called without a specified data set or
Severity: Minor
Found in Src/scripts/sprydata.js - About 55 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 dirNodeCheck has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

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

    Avoid deeply nested control flow statements.
    Open

                        if (!mustRevert) {
                            this.setValue(this.fixedValue);
                            this.selection.moveTo(this.fixedValue.length, this.fixedValue.length);
                        } else {
                            this.setValue(this.oldValue.substring(0, this.selection.start) + autocomplete);
    Severity: Major
    Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if ( a == b ) {
                      hasDuplicate = true;
                  }
      Severity: Major
      Found in Src/scripts/prototype.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if ( !isXML ) {
                                elem.sizcache = doneName;
                                elem.sizset = i;
                            }
        Severity: Major
        Found in Src/scripts/prototype.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (!this.isValueValid(futureValue, this.selection.start + 1, group)) 
                              {
                                  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 (!attribute) return null;
            Severity: Major
            Found in Src/scripts/prototype.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( !inplace ) {
                                      curLoop = result;
                                  }
              Severity: Major
              Found in Src/scripts/prototype.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                      if (element.tagName.toUpperCase() == 'IMG' && element.width) {
                        element.width++; element.width--;
                      } else try {
                        var n = document.createTextNode(' ');
                        element.appendChild(n);
                Severity: Major
                Found in Src/scripts/prototype.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (q < t) {
                                          break;
                                      }
                  Severity: Major
                  Found in Src/scripts/spryvalidationtextfield.js - About 45 mins to fix

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

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

                      Avoid deeply nested control flow statements.
                      Open

                              if (value[1]) return parseFloat(value[1]) / 100;
                      Severity: Major
                      Found in Src/scripts/prototype.js - About 45 mins to fix

                        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
                                Severity
                                Category
                                Status
                                Source
                                Language