joegattnet/joegattnet_v3

View on GitHub

Showing 103 of 103 total issues

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

    Gmaps4Rails.prototype.create_polylines = function() {
      var polyline, _i, _len, _ref, _results;
      _ref = this.polylines;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4Rails.prototype.create_circles = function() {
      var circle, _i, _len, _ref, _results;
      _ref = this.circles;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4Rails.prototype.create_polygons = function() {
      var polygon, _i, _len, _ref, _results;
      _ref = this.polygons;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4RailsBing.prototype.clearMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4RailsGoogle.prototype.showMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4RailsGoogle.prototype.hideMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4RailsBing.prototype.showMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4Rails.prototype.clear_circles = function() {
      var circle, _i, _len, _ref, _results;
      _ref = this.circles;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.base.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 121..130
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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 11 locations. Consider refactoring.
Open

    Gmaps4RailsBing.prototype.hideMarkers = function() {
      var marker, _i, _len, _ref, _results;
      _ref = this.markers;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.bing.js and 10 other locations - About 4 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 151..160
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 198..207
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 213..222
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 243..252
public/javascripts/gmaps4rails/gmaps4rails.base.js on lines 410..419
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 89..98
public/javascripts/gmaps4rails/gmaps4rails.bing.js on lines 104..113
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 169..178
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 180..189
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 191..200

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 121.

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

Class Pantograph has 33 methods (exceeds 20 allowed). Consider refactoring.
Open

class Pantograph < ActiveRecord::Base

  include Pantographable

  belongs_to :pantographer
Severity: Minor
Found in app/models/pantograph.rb - About 4 hrs to fix

File formatting_helper.rb has 320 lines of code (exceeds 250 allowed). Consider refactoring.
Open

module FormattingHelper
  def bodify(text, books = [], books_citation_style = 'citation.book.inline_annotated_html', links_citation_style = 'citation.link.inline_annotated_html', annotated = true)
    return '' if text.blank?
    # REVIEW: Add settings condition
    text = related_notify(text)
Severity: Minor
Found in app/helpers/formatting_helper.rb - About 3 hrs to fix

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 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 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.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.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

File note.rb has 294 lines of code (exceeds 250 allowed). Consider refactoring.
Open

class Note < ActiveRecord::Base
  include NoteCustom, Syncable

  attr_writer :tag_list, :instruction_list, :keyword_list
  attr_accessor :external_created_at
Severity: Minor
Found in app/models/note.rb - About 3 hrs to fix

Method update_resources_with_evernote_data has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

  def update_resources_with_evernote_data(cloud_note_data)
    # First we remove all resources (to make sure deleted resources disappear -
    #  but we don't want to delete binaries so we use #delete rather than #destroy)
    evernote_note.note.resources.delete_all

Severity: Minor
Found in app/models/evernote_request.rb - 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

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

      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        bound = _ref[_i];
        _results.push(this.boundsObject.extend(this.createLatLng(bound.lat, bound.lng)));
      }
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js and 1 other location - About 2 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.openlayers.js on lines 106..109

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 83.

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(this.createLatLng(marker.lat, marker.lng)));
      }
Severity: Major
Found in public/javascripts/gmaps4rails/gmaps4rails.openlayers.js and 1 other location - About 2 hrs to fix
public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js on lines 407..410

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 83.

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

Severity
Category
Status
Source
Language