GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

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

StepExpr.prototype.evaluate = function(ctx) {
  var input = ctx.node;
  var nodelist = [];

  // NOTE(mesch): When this was a switch() statement, it didn't work
Severity: Minor
Found in Src/scripts/xpath.js - About 6 hrs 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 update has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Widget.SelectionDescriptor.prototype.update = function()
{
    if (Spry.is.ie && Spry.is.windows) {
        var sel = this.element.ownerDocument.selection;
        if (this.element.nodeName == "TEXTAREA") {
Severity: Minor
Found in Src/scripts/spryvalidationtextfield.js - About 6 hrs 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 DSContext has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.Region.DSContext = function(dataSet, processingContext)
{
    var m_dataSet = dataSet;
    var m_processingContext = processingContext;
    var m_curRowIndexArray = [ { rowIndex: -1 } ]; // -1 means return whatever the current row is inside the data set.
Severity: Minor
Found in Src/scripts/sprydata.js - About 6 hrs 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 validation has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
Open

        validation: function(value, options) {
            //    HH:MM:SS T
            var formatRegExp = /([hmst]+)/gi;
            var valueRegExp = /(\d+|AM?|PM?)/gi;
            var formatGroups = options.format.match(formatRegExp);
Severity: Minor
Found in Src/scripts/spryvalidationtextfield.js - About 6 hrs 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 node has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

  node: function(elementName) {
    elementName = elementName.toUpperCase();

    // try innerHTML approach
    var parentTag = this.NODEMAP[elementName] || 'div';
Severity: Minor
Found in Src/scripts/builder.js - About 5 hrs 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 update has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

  update: (function(){

    var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
      var el = document.createElement("select"),
          isBuggy = true;
Severity: Minor
Found in Src/scripts/prototype.js - About 5 hrs 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 onKeyDown has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Widget.ValidationTextField.prototype.onKeyDown = function(e)
{
    this.saveState();
    this.keyCode = e.keyCode;

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

Form.Element.Serializers = (function() {
  function input(element, value) {
    switch (element.type.toLowerCase()) {
      case 'checkbox':
      case 'radio':
Severity: Minor
Found in Src/scripts/prototype.js - About 5 hrs 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 addMethods has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

Element.addMethods = function(methods) {
  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;

  if (!methods) {
    Object.extend(Form, Form.Methods);
Severity: Minor
Found in Src/scripts/prototype.js - About 4 hrs 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 processTokens has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Spry.Data.Region.prototype.processTokens = function(outputArr, token, processContext)
{
    var i = 0;

    switch(token.tokenType)
Severity: Major
Found in Src/scripts/sprydata.js - About 4 hrs to fix

    Function attachBehaviors has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    Spry.Widget.ValidationTextField.prototype.attachBehaviors = function()
    {
        if (this.element) {
            if (this.element.nodeName == "INPUT") {
                this.input = this.element;
    Severity: Minor
    Found in Src/scripts/spryvalidationtextfield.js - About 4 hrs 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 DSContext has 116 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Spry.Data.Region.DSContext = function(dataSet, processingContext)
    {
        var m_dataSet = dataSet;
        var m_processingContext = processingContext;
        var m_curRowIndexArray = [ { rowIndex: -1 } ]; // -1 means return whatever the current row is inside the data set.
    Severity: Major
    Found in Src/scripts/sprydata.js - About 4 hrs to fix

      File spryvalidationselect.js has 357 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // SpryValidationSelect.js - version 0.10 - Spry Pre-Release 1.6.1
      //
      // Copyright (c) 2006. Adobe Systems Incorporated.
      // All rights reserved.
      //
      Severity: Minor
      Found in Src/scripts/spryvalidationselect.js - About 4 hrs to fix

        Function xpathReduce has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
        Open

        function xpathReduce(stack, ahead) {
          var cand = null;
        
          if (stack.length > 0) {
            var top = stack[stack.length-1];
        Severity: Minor
        Found in Src/scripts/xpath.js - About 4 hrs 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 processDataRefString has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
        Open

        Spry.Data.Region.processDataRefString = function(processingContext, regionStr, dataSetsToUse, isJSExpr)
        {
            if (!regionStr)
                return "";
        
        
        Severity: Minor
        Found in Src/scripts/sprydata.js - About 4 hrs 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 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Spry.Data.DataSet.prototype.sort.getSortFunc = function(prop, type, order)
        {
            var sortfunc = null;
            if (type == "number")
            {
        Severity: Major
        Found in Src/scripts/sprydata.js - About 4 hrs to fix

          Function tokenizeData has 109 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Spry.Data.Region.prototype.tokenizeData = function(dataStr)
          {
              // If there is no data, there's nothing to do.
              if (!dataStr)
                  return null;
          Severity: Major
          Found in Src/scripts/sprydata.js - About 4 hrs to fix

            Function validation has a Cognitive Complexity of 29 (exceeds 5 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 4 hrs 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 validateIP has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            Spry.Widget.ValidationTextField.validateIP = function (value, format)
            {
                var validIPv6Addresses = [
                    //preferred
                    /^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}(?:\/\d{1,3})?$/i,
            Severity: Minor
            Found in Src/scripts/spryvalidationtextfield.js - About 4 hrs 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 fixupIETagAttributes has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
            Open

            Spry.Utils.fixupIETagAttributes = function(inStr)
            {
                var outStr = "";
            
                // Break the tag string into 3 pieces.
            Severity: Minor
            Found in Src/scripts/sprydata.js - About 4 hrs 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