GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Avoid too many return statements within this function.
Open

                return 1;
Severity: Major
Found in Src/scripts/sprydata.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                        return -1;
    Severity: Major
    Found in Src/scripts/sprydata.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                              return 1;
      Severity: Major
      Found in Src/scripts/sprydata.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return null;
        Severity: Major
        Found in Src/scripts/sprydata.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return 1;
          Severity: Major
          Found in Src/scripts/sprydata.js - About 30 mins to fix

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

              getStorage: function(element) {
                if (!(element = $(element))) return;
            
                var uid;
                if (element === window) {
            Severity: Minor
            Found in Src/scripts/prototype.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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              initialize: function(request){
                this.request = request;
                var transport  = this.transport  = request.transport,
                    readyState = this.readyState = transport.readyState;
            
            
            Severity: Minor
            Found in Src/scripts/prototype.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 clonePosition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              clonePosition: function(element, source) {
                var options = Object.extend({
                  setLeft:    true,
                  setTop:     true,
                  setWidth:   true,
            Severity: Minor
            Found in Src/scripts/prototype.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 compileDatePattern has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            Spry.Widget.ValidationTextField.prototype.compileDatePattern = function () 
            {
                var dateValidationPatternString = "";
                var groupPatterns = [];
                var fullGroupPatterns = [];
            Severity: Minor
            Found in Src/scripts/spryvalidationtextfield.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 _getContentFromAnonymousElement has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            Element._getContentFromAnonymousElement = function(tagName, html, force) {
              var div = new Element('div'),
                  t = Element._insertionTranslations.tags[tagName];
            
              var workaround = false;
            Severity: Minor
            Found in Src/scripts/prototype.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 ObjectRange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            var ObjectRange = Class.create(Enumerable, (function() {
              function initialize(start, end, exclusive) {
                this.start = start;
                this.end = end;
                this.exclusive = exclusive;
            Severity: Minor
            Found in Src/scripts/prototype.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 next has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              next: function(element, expression, index) {
                element = $(element);
                if (Object.isNumber(expression)) index = expression, expression = false;
                if (!Object.isNumber(index)) index = 0;
            
            
            Severity: Minor
            Found in Src/scripts/prototype.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 getInputs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              getInputs: function(form, typeName, name) {
                form = $(form);
                var inputs = form.getElementsByTagName('input');
            
                if (!typeName && !name) return $A(inputs).map(Element.extend);
            Severity: Minor
            Found in Src/scripts/prototype.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 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 resizeImageContainer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                resizeImageContainer: function(imgWidth, imgHeight) {
            
                    // get current width and height
                    var widthCurrent  = this.outerImageContainer.getWidth();
                    var heightCurrent = this.outerImageContainer.getHeight();
            Severity: Minor
            Found in Src/scripts/lightbox.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 evaluate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            FilterExpr.prototype.evaluate = function(ctx) {
              var nodes = this.expr.evaluate(ctx).nodeSetValue();
              for (var i = 0; i < this.predicate.length; ++i) {
                var nodes0 = nodes;
                nodes = [];
            Severity: Minor
            Found in Src/scripts/xpath.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 xmlValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function xmlValue(node) {
              if (!node) {
                return '';
              }
            
            
            Severity: Minor
            Found in Src/scripts/xpath.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