app/javascript/src/maps-search.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function initItineraryIndex has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const initItineraryIndex = function () {
  indexItinerariesMapInit('#index-itineraries-map')

  clearItineraries()

Severity: Major
Found in app/javascript/src/maps-search.js - About 2 hrs to fix

    Function drawPath has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const drawPath = function (itinerary, strokeColor, strokeOpacity) {
      if (strokeColor == null) { strokeColor = '#0000FF' }
      if (strokeOpacity == null) { strokeOpacity = 0.45 }
      icare.latLngBounds.extend(new google.maps.LatLng(itinerary.start_location.lat, itinerary.start_location.lng))
      icare.latLngBounds.extend(new google.maps.LatLng(itinerary.end_location.lat, itinerary.end_location.lng))
    Severity: Minor
    Found in app/javascript/src/maps-search.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status