GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Function getValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.DataSet.prototype.getValue = function(valueName, rowContext)
{
    var result = undefined;

    // If a rowContext is not defined, we default to
Severity: Minor
Found in Src/scripts/sprydata.js - About 25 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 collectTextNodesIgnoreClass has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Element.collectTextNodesIgnoreClass = function(element, className) {
  return $A($(element).childNodes).collect( function(node) {
    return (node.nodeType==3 ? node.nodeValue :
      ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
        Element.collectTextNodesIgnoreClass(node, className) : ''));
Severity: Minor
Found in Src/scripts/effects.js - About 25 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 ValidationSelect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Widget.ValidationSelect = function(element, opts)
{
    this.init(element);

    Spry.Widget.Utils.setOptions(this, opts);
Severity: Minor
Found in Src/scripts/spryvalidationselect.js - About 25 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 callback has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Utils.loadURL.callback = function(req)
{
    if (!req || req.xhRequest.readyState != 4)
        return;
    if (req.successCallback && (req.xhRequest.status == 200 || req.xhRequest.status == 0))
Severity: Minor
Found in Src/scripts/sprydata.js - About 25 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 nodeContainsElementNode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.XMLDataSet.nodeContainsElementNode = function(node)
{
    if (node)
    {
        node = node.firstChild;
Severity: Minor
Found in Src/scripts/sprydata.js - About 25 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 attach has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    attach: function(rgn, node, value)
    {
        if (value)
        {
            rowNumAttr = node.attributes.getNamedItem("spryoddrownumber");
Severity: Minor
Found in Src/scripts/sprydata.js - About 25 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 indexOf has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.Region.ProcessingContext.prototype.indexOf = function(arr, item)
{
    // Given an array, return the index of item in that array
    // or -1 if it doesn't exist.

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

Spry.Data.HTTPSourceDataSet.prototype.setURL = function(url, requestOptions)
{
    if (this.url == url)
    {
        // The urls match so we may not have to do anything, but
Severity: Minor
Found in Src/scripts/sprydata.js - About 25 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 buildOpenTagForRepeat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

Spry.Data.Region.PI.buildOpenTagForRepeat = function(ele, piName)
{
    if (!ele || !piName)
        return "";

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

Spry.Data.HTTPSourceDataSet.LoadManager.CachedRequest.prototype.loadDataCallback = function(req)
{
    if (req.xhRequest.readyState != 4)
        return;

Severity: Minor
Found in Src/scripts/sprydata.js - About 25 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

Severity
Category
Status
Source
Language