Showing 17 of 31 total issues
Function fromLatLng
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
fromLatLng: function(latlng){
/* Long/Lat to QTH locator conversion largely */
/* inspired from the DL4MFM code found here : */
/* http://members.aol.com/mfietz/ham/calcloce.html */
- 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 fromLatLng
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
fromLatLng: function (latlng) {
//Copyright (c) 2006, HELMUT H. HEIMEIER
/*
* Okay, this just gives the wrong result:
Function fromLatLng
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
fromLatLng: function (latlng) {
//Copyright (c) 2006, HELMUT H. HEIMEIER
/*
* Okay, this just gives the wrong result:
- 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 toLatLng
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
toLatLng: function (utm){
// Copyright (c) 2006, HELMUT H. HEIMEIER
var zone = utm.zone;
var ew = utm.x;
Function exports
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function fromLatLng
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
fromLatLng: function(latlng){
/* Long/Lat to QTH locator conversion largely */
/* inspired from the DL4MFM code found here : */
/* http://members.aol.com/mfietz/ham/calcloce.html */
Function _update
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_update: function(e){
//lat: [-90,90]
//lng: [-180,180]
var lat = (e.latlng.lat+90)%180;
var lng = (e.latlng.lng+180)%360;
Function fromUTM
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
fromUTM: function (utm) {
// Copyright (c) 2006, HELMUT H. HEIMEIER
if(utm === undefined){
return;
Function _update
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
_update: function(e){
//lat: [-90,90]
//lng: [-180,180]
var lat = (e.latlng.lat+90)%180;
var lng = (e.latlng.lng+180)%360;
- 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 toUTM
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
toUTM: function (mgr) {
// Copyright (c) 2006, HELMUT H. HEIMEIER
// Laengenzone zone, Ostwert ew und Nordwert nw im WGS84 Datum
var m_east_0 = "STUVWXYZ";
Function fromLatLng
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
fromLatLng: function(latlng) {
var lat = latlng.lat;
var lon = latlng.lng;
var x = [];
Avoid deeply nested control flow statements. Open
if (yk === 2) ydiv = 1;
Avoid deeply nested control flow statements. Open
if (yk === 1) ydiv = 20;
Avoid deeply nested control flow statements. Open
if (yk === 1) ydiv = 10;
Function fromUTM
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
fromUTM: function (utm) {
// Copyright (c) 2006, HELMUT H. HEIMEIER
if(utm === undefined){
return;
- 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
Avoid deeply nested control flow statements. Open
if (yk === 2) ydiv = 2;
Function fromLatLng
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
fromLatLng: function(latlng) {
var lat = latlng.lat;
var lon = latlng.lng;
var x = [];
- 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"