linguisticexplorer/Linguistic-Explorer

View on GitHub
public/javascripts/gmaps4rails/gmaps4rails.mapquest.js

Summary

Maintainability
F
4 days
Test Coverage

Function Gmaps4RailsMapquest has 133 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  this.Gmaps4RailsMapquest = (function(_super) {

    __extends(Gmaps4RailsMapquest, _super);

    function Gmaps4RailsMapquest() {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js - About 5 hrs to fix

    Function createMarker has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Gmaps4RailsMapquest.prototype.createMarker = function(args) {
          var icon, marker;
          marker = new MQA.Poi({
            lat: args.Lat,
            lng: args.Lng
    Severity: Minor
    Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js - About 1 hr to fix

      Function createMarkerImage has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          Gmaps4RailsMapquest.prototype.createMarkerImage = function(markerPicture, markerSize, origin, anchor, scaledSize) {};
      Severity: Minor
      Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js - About 35 mins to fix

        Identical blocks of code found in 4 locations. Consider refactoring.
        Open

          var __hasProp = Object.prototype.hasOwnProperty,
            __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 3 other locations - About 4 hrs to fix
        public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 2..3
        public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 2..3
        public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 2..3

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 134.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

              if (args.shadow_picture !== "") {
                icon = new MQA.Icon(args.shadow_picture, args.shadow_height, args.shadow_width);
                marker.setShadow(icon);
                if (args.shadow_anchor !== null) {
                  marker.setShadowOffset({
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 1 other location - About 3 hrs to fix
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 55..64

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 108.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

              if (args.marker_picture !== "") {
                icon = new MQA.Icon(args.marker_picture, args.marker_height, args.marker_width);
                marker.setIcon(icon);
                if (args.marker_anchor !== null) {
                  marker.setBias({
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 1 other location - About 3 hrs to fix
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 65..74

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 108.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            Gmaps4RailsMapquest.prototype.clearMarkers = function() {
              var marker, _i, _len, _results;
              _results = [];
              for (_i = 0, _len = markers.length; _i < _len; _i++) {
                marker = markers[_i];
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 2 other locations - About 3 hrs to fix
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 89..97
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 99..107

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 107.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            Gmaps4RailsMapquest.prototype.showMarkers = function() {
              var marker, _i, _len, _results;
              _results = [];
              for (_i = 0, _len = markers.length; _i < _len; _i++) {
                marker = markers[_i];
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 2 other locations - About 3 hrs to fix
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 79..87
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 99..107

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 107.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            Gmaps4RailsMapquest.prototype.hideMarkers = function() {
              var marker, _i, _len, _results;
              _results = [];
              for (_i = 0, _len = markers.length; _i < _len; _i++) {
                marker = markers[_i];
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 2 other locations - About 3 hrs to fix
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 79..87
        public/javascripts/gmaps4rails/gmaps4rails.mapquest.js on lines 89..97

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 107.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

                for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                  marker = _ref[_i];
                  _results.push(this.boundsObject.extend(marker.serviceObject.latLng));
                }
        Severity: Major
        Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js and 1 other location - About 1 hr to fix
        public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 225..228

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 74.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status