Showing 15 of 19 total issues
Function j
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
var d = function j() {
var a = function(a) {
var b = a.gradient || a.defaultGradient;
var c = document.createElement("canvas");
var d = c.getContext("2d");
File heatmap.min.js
has 529 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* heatmap.js v2.0.0 | JavaScript Heatmap Library
*
* Copyright 2008-2014 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved.
* Dual licensed under MIT and Beerware license
Function i
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
var c = function i() {
var a = function d(a) {
this._coordinator = {};
this._data = [];
this._radi = [];
Function l
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
var g = function l() {
var a = function h() {
function a() {
this.cStore = {}
}
Function _colorize
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_colorize: function() {
var a = this._renderBoundaries[0];
var b = this._renderBoundaries[1];
var c = this._renderBoundaries[2] - a;
var d = this._renderBoundaries[3] - b;
Method dump_json
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.dump_json(opts = {})
@output_dir = opts[:output_dir] || './tmp'
@api_version = opts[:api_version] || 'v1'
- 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
Method dump_json
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.dump_json(opts = {})
@output_dir = opts[:output_dir] || './tmp'
@api_version = opts[:api_version] || 'v1'
Function _update
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
_update: function() {
var bounds, zoom, scale;
bounds = this._map.getBounds();
zoom = this._map.getZoom();
Function _update
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_update: function() {
var bounds, zoom, scale;
bounds = this._map.getBounds();
zoom = this._map.getZoom();
- 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 _drawAlpha
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawAlpha: function(a) {
var c = this._min = a.min;
var d = this._max = a.max;
var a = a.data || [];
var e = a.length;
Function _organiseData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_organiseData: function(a, b) {
var d = a[this._xField];
var e = a[this._yField];
var f = this._radi;
var g = this._data;
Function c
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
var c = function(a) {
var b = [];
var c = a.min;
var d = a.max;
var e = a.radi;
Function addData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
addData: function(pointOrArray) {
if (pointOrArray.length > 0) {
var len = pointOrArray.length;
while(len--) {
this.addData(pointOrArray[len]);
- 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
Method import
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.import(csv_dir = '')
csv_dir = self.default_csv_dir.to_s if csv_dir === ''
puts " Importing data from: " + csv_dir
Rails.application.eager_load!
ActiveRecord::Base.transaction do
- 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
Method update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update
# BUG of act_as_list
# if an element is not in list and added to the list => there is a weird behaviour with the
# first position
# current element in position 0, keeps the same position.
- 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"