GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Function notifyObservers has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Utils.Notifier.prototype.notifyObservers = function(methodName, data)
{
    if (!methodName)
        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 attach has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    attach: function(rgn, node, value)
    {
        if (!value)
            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 setState has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.Region.prototype.setState = function(stateName, suppressNotfications)
{
    var stateObj = { state: stateName, mappedState: this.getMappedState(stateName) };
    if (!suppressNotfications)
        Spry.Data.Region.notifyObservers("onPreStateChange", this, stateObj);
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 processContentPI has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.Region.processContentPI = function(inStr)
{
    var outStr = "";
    var regexp = /<!--\s*<\/?spry:content\s*[^>]*>\s*-->/mg;
    var searchStartIndex = 0;
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 dirCheck has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function dirCheck( 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 validate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spry.Widget.ValidationSelect.prototype.validate = function() {
        this.reset();
        // check isRequired
        if (this.isRequired) {
            // there are no options, or no option has been selected
    Severity: Minor
    Found in Src/scripts/spryvalidationselect.js - About 1 hr to fix

      Function BrowserSniff has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Spry.Widget.BrowserSniff = function()
      {
          var b = navigator.appName.toString();
          var up = navigator.platform.toString();
          var ua = navigator.userAgent.toString();
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

        Function showExpressInstall has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function showExpressInstall(regObj) {
                isExpressInstallActive = true;
                var obj = getElementById(regObj.id);
                if (obj) {
                    if (regObj.altContentId) {
        Severity: Minor
        Found in Src/scripts/swfobject_modified.js - About 1 hr to fix

          Function serializeObject has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Spry.Utils.serializeObject = function(obj)
          {
              // Create a JSON representation of a given object.
          
              var str = "";
          Severity: Minor
          Found in Src/scripts/sprydata.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

                    if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
                        submit !== false && (!submit || key == submit) && (submitted = true)))) {
                      result = accumulator(result, key, value);
                    }
            Severity: Critical
            Found in Src/scripts/prototype.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                          if ( match[1] == "nth" ) {
                              var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
                                  match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
                                  !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
              
              
              Severity: Critical
              Found in Src/scripts/prototype.js - About 1 hr to fix

                Function fixUpIEInnerHTML has 33 lines of code (exceeds 25 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

                  Function onChange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Spry.Widget.ValidationTextField.prototype.onChange = function(e)
                  {
                      if (Spry.is.opera && this.flags.operaRevertOnKeyUp) {
                          return true;
                      }
                  Severity: Minor
                  Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

                    Function loadURL has 32 lines of code (exceeds 25 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 1 hr to fix

                      Function loadDataIntoDataSet has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Spry.Data.XMLDataSet.prototype.loadDataIntoDataSet = function(rawDataDoc)
                      {
                          var rs = null;
                          var mainXPath = Spry.Data.Region.processDataRefString(null, this.xpath, this.dataSetsForDataRefStrings);
                          var subPaths = this.subPaths;
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr to fix

                        Function setOpacity has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                          Element.Methods.setOpacity = function(element, value) {
                            function stripAlpha(filter){
                              return filter.replace(/alpha\([^\)]*\)/gi,'');
                            }
                            element = $(element);
                        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 respondToReadyState has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                          respondToReadyState: function(readyState) {
                            var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
                        
                            if (state == 'Complete') {
                              try {
                        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 collapse has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Spry.Widget.SelectionDescriptor.prototype.collapse = function(begin)
                        {
                            if (Spry.is.ie && Spry.is.windows) {
                                this.range = this.element.ownerDocument.selection.createRange();
                                this.range.collapse(begin);
                        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 select has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Spry.Utils.SelectionManager.SelectionGroup.prototype.select = function(element, className, multiSelect)
                        {
                            var selObj = null;
                        
                            if (!multiSelect)
                        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 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
                          Severity
                          Category
                          Status
                          Source
                          Language