lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

Consider simplifying this complex logical expression.
Open

        if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
            submit !== false && (!submit || key == submit) && (submitted = true)))) {
          if (key in result) {
            // a key is already present; construct an array of values
            if (!Object.isArray(result[key])) result[key] = [result[key]];
Severity: Critical
Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

    Function polylineCenterAndZoom has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Mapstraction.prototype.polylineCenterAndZoom = function(radius)
    {
        if(this.loaded[this.api] == false)
        {
            myself = this;
    Severity: Minor
    Found in js/mapstraction.js - About 1 hr to fix

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

            'not': function(m) {
              var e = m[6], p = Selector.patterns,
                  x = Selector.xpath, le, v;
      
              var exclusion = [];
      Severity: Minor
      Found in js/prototype/prototype-1.6.0.3.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 compileXPathMatcher has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

        compileXPathMatcher: function() {
          var e = this.expression, ps = Selector.patterns,
              x = Selector.xpath, le, m;
      
          if (Selector._cache[e]) {
      Severity: Minor
      Found in js/prototype/prototype-1.6.0.3.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 js/prototype/prototype-1.6.0.3.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 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 js/prototype/prototype-1.6.0.3.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 viewportOffset has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

        viewportOffset: function(forElement) {
          var valueT = 0, valueL = 0;
      
          var element = forElement;
          do {
      Severity: Minor
      Found in js/prototype/prototype-1.6.0.3.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 closeBubble has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Marker.prototype.closeBubble = function() {
         if(this.mapstraction.loaded[this.api] === false) {
             var my_marker = this;
             this.mapstraction.onload[this.api].push( function() {
                 my_marker.closeBubble();
      Severity: Minor
      Found in js/mapstraction.js - About 1 hr to fix

        Function request has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          request: function(url) {
            this.url = url;
            this.method = this.options.method;
            var params = Object.clone(this.options.parameters);
        
        
        Severity: Minor
        Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

          Function addMapTypeControls has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Mapstraction.prototype.addMapTypeControls = function() {
              if(this.loaded[this.api] === false) {
                  var me = this;
                  this.onload[this.api].push( function() {
                      me.addMapTypeControls();
          Severity: Minor
          Found in js/mapstraction.js - About 1 hr to fix

            Method recaptcha_check_answer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
            {
                if ($privkey == null || $privkey == '') {
                    die("To use reCAPTCHA you must get an API key from <a href='http://recaptcha.net/api/getkey'>http://recaptcha.net/api/getkey</a>");
                }
            Severity: Minor
            Found in lib/recaptchalib.php - About 1 hr to fix

              Method route_find has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function route_find($method, $path)
              {
                $routes = route();
                $method = strtoupper($method);
                foreach($routes as $route)
              Severity: Minor
              Found in lib/limonade.php - About 1 hr to fix

                Function getPixelRatio has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Mapstraction.prototype.getPixelRatio = function()
                {
                    if(this.loaded[this.api] == false)
                    {
                        myself = this;
                Severity: Minor
                Found in js/mapstraction.js - About 1 hr to fix

                  Function hide has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Marker.prototype.hide = function() {
                      if (this.api) {
                          switch (this.api) {
                              case 'google':
                              case 'openstreetmap':
                  Severity: Minor
                  Found in js/mapstraction.js - About 1 hr to fix

                    Function show has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Marker.prototype.show = function() {
                        if (this.api) {
                            switch (this.api) {
                                case 'google':
                                case 'openstreetmap':
                    Severity: Minor
                    Found in js/mapstraction.js - About 1 hr to fix

                      Function onreadystatechange has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                         request.onreadystatechange = function(){        
                              if (request.readyState == 4){
                                  var data = request.responseXML;
                                  placemarks = data.documentElement.getElementsByTagName("Placemark");
                                  for(var i=0; i<placemarks.length; i++){
                      Severity: Minor
                      Found in js/KMLparser.js - About 1 hr to fix

                        Method ListNewerFarDojo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function ListNewerFarDojo($file)
                        {
                            $farxml = LoadFarXML($file);
                            $localxml = Load_Xml_data();
                            
                        Severity: Minor
                        Found in lib/sync.model.php - About 1 hr to fix

                          Function addPolygon has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                           Mapstraction.prototype.addPolygon = function(polygon) {
                             if(this.loaded[this.api] == false)
                             {
                               myself = this;
                               this.onload[this.api].push(function()
                          Severity: Minor
                          Found in js/mapstraction.js - About 1 hr to fix

                            Function nth has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                nth: function(nodes, formula, root, reverse, ofType) {
                                  if (nodes.length == 0) return [];
                                  if (formula == 'even') formula = '2n+0';
                                  if (formula == 'odd')  formula = '2n+1';
                                  var h = Selector.handlers, results = [], indexed = [], m;
                            Severity: Minor
                            Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix

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

                              Event.extend = (function() {
                                var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
                                  m[name] = Event.Methods[name].methodize();
                                  return m;
                                });
                              Severity: Minor
                              Found in js/prototype/prototype-1.6.0.3.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language