GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Function getPageSize has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    getPageSize: function() {
            
         var xScroll, yScroll;
        
        if (window.innerHeight && window.scrollMaxY) {    
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 getNodeText has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.XMLDataSet.getNodeText = function(node, encodeText, encodeCData)
{
    var txt = "";

    if (!node)
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 getRecordSetFromXMLDoc has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Spry.Data.XMLDataSet.getRecordSetFromXMLDoc = function(xmlDoc, path, suppressColumns, entityEncodeStrings)
{
    if (!xmlDoc || !path)
        return null;

Severity: Minor
Found in Src/scripts/sprydata.js - About 1 hr to fix

    Function menu has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function menu(){
        var menu = document.getElementById("menu");
        var menuCE = document.getElementById("canto_menu_esquerdo");
        var menuCC = document.getElementById("menu_centro");
        var menuCD = document.getElementById("canto_menu_direito");
    Severity: Minor
    Found in Src/scripts/scripts.js - About 1 hr to fix

      Function validation has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              validation: function(value, options) {
                  //fix for ?ID=223429 and ?ID=223387
                  /* the following regexp matches components of an URI as specified in http://tools.ietf.org/html/rfc3986#page-51 page 51, Appendix B.
                      scheme    = $2
                      authority = $4
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

        Function stopObserving has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function stopObserving(element, eventName, handler) {
            element = $(element);
        
            var registry = Element.retrieve(element, 'prototype_event_registry');
            if (!registry) return element;
        Severity: Minor
        Found in Src/scripts/prototype.js - About 1 hr to fix

          Function validate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Spry.Widget.ValidationTextField.prototype.validate = function() {
          
              this.resetClasses();
              //possible states: required, format, rangeMin, rangeMax, charsMin, charsMax
              if (this.validateOn & Spry.Widget.ValidationTextField.ONSUBMIT) {
          Severity: Minor
          Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

            Function embedSWF has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
                        if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
                            return;
                        }
                        widthStr += ""; // Auto-convert to string to make it idiot proof
            Severity: Minor
            Found in Src/scripts/swfobject_modified.js - About 1 hr to fix

              Function filterData has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Function distinct has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Spry.Data.DataSet.prototype.distinct = function(columnNames)
                {
                    if (this.data)
                    {
                        var oldData = this.data;
                Severity: Minor
                Found in Src/scripts/sprydata.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if (this.input) {
                          if (this.maxChars) {
                              this.input.removeAttribute("maxLength");
                          }
                          this.putHint();
                  Severity: Critical
                  Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                    Function update has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function update(element, content) {
                          element = $(element);
                          var purgeElement = Element._purgeElement;
                    
                          var descendants = element.getElementsByTagName('*'),
                    Severity: Minor
                    Found in Src/scripts/prototype.js - About 1 hr to fix

                      Function menu has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function menu(){
                          var menu = document.getElementById("menu");
                          var menuCE = document.getElementById("canto_menu_esquerdo");
                          var menuCC = document.getElementById("menu_centro");
                          var menuCD = document.getElementById("canto_menu_direito");
                      Severity: Minor
                      Found in Src/scripts/scripts.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 setStyle has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                        setStyle: function(element, styles) {
                          element = $(element);
                          var elementStyle = element.style, match;
                          if (Object.isString(styles)) {
                            element.style.cssText += ';' + styles;
                      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 setRequestHeaders has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                        setRequestHeaders: function() {
                          var headers = {
                            'X-Requested-With': 'XMLHttpRequest',
                            'X-Prototype-Version': Prototype.Version,
                            'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
                      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 getElementsByClassName has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
                        function iter(name) {
                          return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + 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 xpathGrammarPrecedence has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function xpathGrammarPrecedence(frame) {
                        var ret = 0;
                      
                        if (frame.rule) { /* normal reduce */
                          if (frame.rule.length >= 3 && frame.rule[2] >= 0) {
                      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 fixUpIEInnerHTML has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Spry.Utils.fixUpIEInnerHTML = function(inStr)
                      {
                          var outStr = "";
                      
                          // Create a regular expression that will match:
                      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 setAttribute has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Spry.Utils.setAttribute = function(ele, name, value)
                      {
                          ele = Spry.$(ele);
                          if (!ele || !name)
                              return;
                      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 compilePattern has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Spry.Widget.ValidationTextField.prototype.compilePattern = function() {
                          if (!this.pattern) {
                              return;
                          }
                          var compiled = [];
                      Severity: Minor
                      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language