GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Function getNodesByFunc has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Spry.Utils.getNodesByFunc = function(root, func)
{
    var nodeStack = new Array;
    var resultArr = new Array;
    var node = root;
Severity: Minor
Found in Src/scripts/sprydata.js - About 1 hr to fix

    Function filter has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spry.Data.DataSet.prototype.filter = function(filterFunc, filterOnly)
    {
        // This is a non-destructive filter function.
    
        var dataChanged = false;
    Severity: Minor
    Found in Src/scripts/sprydata.js - About 1 hr to fix

      Function request has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        request: function(url) {
          this.url = url;
          this.method = this.options.method;
          var params = Object.isString(this.options.parameters) ?
                this.options.parameters :
      Severity: Minor
      Found in Src/scripts/prototype.js - About 1 hr to fix

        Function moveTo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Spry.Widget.SelectionDescriptor.prototype.moveTo = function(start, end)
        {
            if (Spry.is.ie && Spry.is.windows) {
                if (this.element.nodeName == "TEXTAREA") {
                    var ta_range = this.element.createTextRange();
        Severity: Minor
        Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

          Function Selector has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Prototype.Selector = (function() {
          
            function select() {
              throw new Error('Method "Prototype.Selector.select" must be defined.');
            }
          Severity: Minor
          Found in Src/scripts/prototype.js - About 1 hr to fix

            Function xpathSort has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function xpathSort(input, sort) {
              if (sort.length == 0) {
                return;
              }
            
            
            Severity: Minor
            Found in Src/scripts/xpath.js - About 1 hr to fix

              Function embedSWF has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
              Severity: Major
              Found in Src/scripts/swfobject_modified.js - About 1 hr to fix

                Function serializeElements has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  serializeElements: function(elements, options) {
                    if (typeof options != 'object') options = { hash: !!options };
                    else if (Object.isUndefined(options.hash)) options.hash = true;
                    var key, value, submitted = false, submit = options.submit, accumulator, initial;
                
                
                Severity: Minor
                Found in Src/scripts/prototype.js - About 1 hr to fix

                  Function dirNodeCheck has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
                      var sibDir = dir == "previousSibling" && !isXML;
                      for ( var i = 0, l = checkSet.length; i < l; i++ ) {
                          var elem = checkSet[i];
                          if ( elem ) {
                  Severity: Minor
                  Found in Src/scripts/prototype.js - About 1 hr to fix

                    Function ATTR has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            ATTR: function(elem, match){
                                var name = match[1],
                                    result = Expr.attrHandle[ name ] ?
                                        Expr.attrHandle[ name ]( elem ) :
                                        elem[ name ] != null ?
                    Severity: Minor
                    Found in Src/scripts/prototype.js - About 1 hr to fix

                      Function validation has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                              validation: function(value, options) {
                                  if (value == '' || value == '-' || value == '+') {
                                      return false;
                                  }
                                  var regExp = /^[\-\+]?\d*$/;
                      Severity: Minor
                      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr 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 readAttribute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                        readAttribute: function(element, name) {
                          element = $(element);
                          if (Prototype.Browser.IE) {
                            var t = Element._attributeTranslations.read;
                            if (t.values[name]) return t.values[name](element, name);
                      Severity: Minor
                      Found in Src/scripts/prototype.js - About 1 hr 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 replace has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                        Element.Methods.replace = function(element, content) {
                          element = $(element);
                      
                          if (content && content.toElement) content = content.toElement();
                          if (Object.isElement(content)) {
                      Severity: Minor
                      Found in Src/scripts/prototype.js - About 1 hr 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 keyboardAction has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          keyboardAction: function(event) {
                              var keycode = event.keyCode;
                      
                              var escapeKey;
                              if (event.DOM_VK_ESCAPE) {  // mozilla
                      Severity: Minor
                      Found in Src/scripts/lightbox.js - About 1 hr 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 getRowNumber has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Spry.Data.DataSet.prototype.getRowNumber = function(row, unfiltered)
                      {
                          if (row)
                          {
                              var rows = this.getData(unfiltered);
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr 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 destroy has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Spry.Widget.ValidationSelect.prototype.destroy = function() {
                          if (this.event_handlers)
                              for (var i=0; i<this.event_handlers.length; i++) {
                                  Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
                              }
                      Severity: Minor
                      Found in Src/scripts/spryvalidationselect.js - About 1 hr 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 id has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                        'id': function(ctx) {
                          assert(this.args.length == 1);
                          var e = this.args[0].evaluate(ctx);
                          var ret = [];
                          var ids;
                      Severity: Minor
                      Found in Src/scripts/xpath.js - About 1 hr 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 getAttribute has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

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

                      Spry.Data.XMLDataSet.prototype.xhRequestProcessor = function(xhRequest)
                      {
                          // XMLDataSet uses the responseXML from the xhRequest
                      
                          var resp = xhRequest.responseXML;
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr 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 updateContent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Spry.Data.Region.prototype.updateContent = function()
                      {
                          var allDataSetsReady = true;
                      
                          var dsArray = this.getDataSets();
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr 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

                      Severity
                      Category
                      Status
                      Source
                      Language