GuilhermeStracini/TCC-SENAC

View on GitHub

Showing 390 of 605 total issues

Function setup has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

  setup: function(){
    function parseColor(color){
      if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
      color = color.parseColor();
      return $R(0,2).map(function(i){
Severity: Minor
Found in Src/scripts/effects.js - About 2 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 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Form.Element.Serializers = (function() {
  function input(element, value) {
    switch (element.type.toLowerCase()) {
      case 'checkbox':
      case 'radio':
Severity: Major
Found in Src/scripts/prototype.js - About 2 hrs to fix

    Function piRegions has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            var piRegions = Spry.Utils.getNodesByFunc(rgn, function(node)
            {
                try
                {
                    if (node.nodeType == 1 /* ELEMENT_NODE */)
    Severity: Major
    Found in Src/scripts/sprydata.js - About 2 hrs to fix

      Function extend has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Element.extend = (function() {
      
        function checkDeficiency(tagName) {
          if (typeof window.Element != 'undefined') {
            var proto = window.Element.prototype;
      Severity: Major
      Found in Src/scripts/prototype.js - About 2 hrs to fix

        Function onKeyDown has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Spry.Widget.ValidationTextField.prototype.onKeyDown = function(e)
        {
            this.saveState();
            this.keyCode = e.keyCode;
        
        
        Severity: Major
        Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

          Function Class has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var Class = (function() {
          
            var IS_DONTENUM_BUGGY = (function(){
              for (var p in { toString: 1 }) {
                if (p === 'toString') return false;
          Severity: Major
          Found in Src/scripts/prototype.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                if (rule &&
                    (rule == TOK_DIV ||
                     rule == TOK_MOD ||
                     rule == TOK_AND ||
                     rule == TOK_OR) &&
            Severity: Critical
            Found in Src/scripts/xpath.js - About 2 hrs to fix

              Function filter has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Sizzle.filter = function(expr, set, inplace, not){
                  var old = expr, result = [], curLoop = set, match, anyFound,
                      isXMLFilter = set && set[0] && isXML(set[0]);
              
                  while ( expr && set.length ) {
              Severity: Major
              Found in Src/scripts/prototype.js - About 2 hrs to fix

                File lightbox.js has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                // -----------------------------------------------------------------------------------
                //
                //    Lightbox v2.05
                //    by Lokesh Dhakar - http://www.lokeshdhakar.com
                //    Last Modification: 3/18/11
                Severity: Minor
                Found in Src/scripts/lightbox.js - About 2 hrs to fix

                  Function applyColumnTypes has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Spry.Data.DataSet.prototype.applyColumnTypes = function()
                  {
                      var rows = this.getData(true);
                      var numRows = rows.length;
                      var colNames = [];
                  Severity: Minor
                  Found in Src/scripts/sprydata.js - About 2 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 attachBehaviors has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Spry.Widget.ValidationTextField.prototype.attachBehaviors = function()
                  {
                      if (this.element) {
                          if (this.element.nodeName == "INPUT") {
                              this.input = this.element;
                  Severity: Major
                  Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

                    Function xpathParseInit has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function xpathParseInit() {
                      if (xpathRules.length) {
                        return;
                      }
                    
                    
                    Severity: Major
                    Found in Src/scripts/xpath.js - About 2 hrs to fix

                      Function xpathMatchStack has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function xpathMatchStack(stack, pattern) {
                      
                        // NOTE(mesch): The stack matches for variable cardinality are
                        // greedy but don't do backtracking. This would be an issue only
                        // with rules of the form A* A, i.e. with an element with variable
                      Severity: Major
                      Found in Src/scripts/xpath.js - About 2 hrs to fix

                        Function ua has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var ua = function() {
                                var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF,
                                    playerVersion = [0,0,0],
                                    d = null;
                                if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
                        Severity: Major
                        Found in Src/scripts/swfobject_modified.js - About 2 hrs to fix

                          Function BrowserSniff has a Cognitive Complexity of 16 (exceeds 5 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 2 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 insert has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                            insert: function(element, insertions) {
                              element = $(element);
                          
                              if (Object.isString(insertions) || Object.isNumber(insertions) ||
                                  Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
                          Severity: Minor
                          Found in Src/scripts/prototype.js - About 2 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 initialize has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              initialize: function() {    
                                  
                                  this.updateImageList();
                                  
                                  this.keyboardAction = this.keyboardAction.bindAsEventListener(this);
                          Severity: Major
                          Found in Src/scripts/lightbox.js - About 2 hrs to fix

                            Function evaluate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            BinaryExpr.prototype.evaluate = function(ctx) {
                              var ret;
                              switch (this.op.value) {
                                case 'or':
                                  ret = new BooleanValue(this.expr1.evaluate(ctx).booleanValue() ||
                            Severity: Major
                            Found in Src/scripts/xpath.js - About 2 hrs to fix

                              Function update has 51 lines of code (exceeds 25 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: Major
                              Found in Src/scripts/spryvalidationtextfield.js - About 2 hrs to fix

                                Function fixupIETagAttributes has 50 lines of code (exceeds 25 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 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language