Showing 13 of 19 total issues
Function BlurredLocation
has 300 lines of code (exceeds 25 allowed). Consider refactoring. Open
BlurredLocation = function BlurredLocation(options) {
var blurredLocation = this;
var blurred = true;
var DEFAULT_PRECISION = 6;
Function BlurredLocation
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
BlurredLocation = function BlurredLocation(options) {
var blurredLocation = this;
var blurred = true;
var DEFAULT_PRECISION = 6;
- Read upRead up
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 Geocoding
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Geocoding(options) {
var map = options.map || document.getElementById("map") || L.map('map');
var google = window.google || undefined;
var geocoder = google ? new google.maps.Geocoder() : undefined;
Function Geocoding
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Geocoding(options) {
var map = options.map || document.getElementById("map") || L.map('map');
var google = window.google || undefined;
var geocoder = google ? new google.maps.Geocoder() : undefined;
- Read upRead up
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 gridSystem
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function gridSystem(options) {
var map = options.map || document.getElementById("map") || L.map('map');
options.cellSize = options.cellSize || { rows:100, cols:100 };
- Read upRead up
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 gridSystem
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function gridSystem(options) {
var map = options.map || document.getElementById("map") || L.map('map');
options.cellSize = options.cellSize || { rows:100, cols:100 };
File blurredLocation.js
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
BlurredLocation = function BlurredLocation(options) {
var blurredLocation = this;
var blurred = true;
var DEFAULT_PRECISION = 6;
Function Interface
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Interface (options) {
options.latId = options.latId || 'lat';
options.lngId = options.lngId || 'lng';
options.placenameInputId = options.placenameInputId || 'placenameInput'; // the placename input box id
Function Interface
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Interface (options) {
options.latId = options.latId || 'lat';
options.lngId = options.lngId || 'lng';
options.placenameInputId = options.placenameInputId || 'placenameInput'; // the placename input box id
- Read upRead up
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 exports
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
"use strict";
require("matchdep")
.filterDev("grunt-*")
.forEach(grunt.loadNpmTasks);
Function getLabeledCoordinate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLabeledCoordinate: function(coordinate, coordinate_type, decimalPlacesAfterZero) {
var dir = "";
if (coordinate_type == "lat") {
if (coordinate < 0) {
coordinate = coordinate * -1;
Function getPlacenameFromCoordinates
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPlacenameFromCoordinates(lat, lng, precision, onResponse) {
if(geocoder) {
geocoder.geocode( { 'location': {lat: lat, lng: lng}}, function(results, status) {
if(status === "OK") {
Avoid deeply nested control flow statements. Open
if (fullAddress.length >= 3) onResponse(fullAddress[fullAddress.length - 3] + "," + fullAddress[fullAddress.length - 2] + "," + country);
else if (fullAddress.length == 2) onResponse(fullAddress[fullAddress.length - 2] + "," + country);
else onResponse(country);