Showing 552 of 552 total issues
Function drawMiniPlot_
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
DygraphRangeSelector.prototype.drawMiniPlot_ = function() {
var fillStyle = this.attr_('rangeSelectorPlotFillColor');
var strokeStyle = this.attr_('rangeSelectorPlotStrokeColor');
if (!fillStyle && !strokeStyle) {
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
Function isSupported
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
DygraphCanvasRenderer.isSupported = function(canvasName) {
var canvas = null;
try {
if (typeof(canvasName) == 'undefined' || canvasName === null) {
canvas = document.createElement("canvas");
- 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 findMinXindex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.findMinXindex = function (arr) {
if (this.minXindex === null) {
this.minXindex = 0;
var x2 = arr[0][0]
for (var maxi = 1; maxi < arr.length; maxi++){
- 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 animateSelection_
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.animateSelection_ = function(direction) {
var totalSteps = 10;
var millis = 30;
if (this.fadeLevel === undefined) this.fadeLevel = 0;
if (this.animateId === undefined) this.animateId = 0;
- 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 drawInteractiveLayer_
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
DygraphRangeSelector.prototype.drawInteractiveLayer_ = function() {
var ctx = this.fgcanvas_ctx_;
ctx.clearRect(0, 0, this.canvasRect_.w, this.canvasRect_.h);
var margin = 1;
var width = this.canvasRect_.w - margin;
- 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 shot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
shot(e){
//check whether initialized and instantiated
if (!this.inst) {
//not instantiated
if (window.fmiinst && window.fmiinst[this.fminame]) {
- 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 changesrc
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
changesrc(...args) {
//super.changesrc(...args);
if (args[0]) this.shownav = (args[0] !== 'false');
if (args['shownav'])this.shownav = (args['shownav'] !== 'false');
if (args[1]) this.showtoc = (args[1] !== 'false');
- 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 detached
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
detached() {
this.stop();
if (this.inputids.length > 0) {
for (let myid of this.inputids) {
const myidel = document.getElementById(myid);
- 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 constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor(){
//this is to register listener function - per aurelia docs -this needs to be done this way
this.handleChange = e => {
if (e.detail && e.detail.id) {
//detail.id is name, need to match in idlist
- 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 attached
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
attached() {
//listening to custom event fmidata
//listening to custom event fmidata and fmireset
const fromel = document.getElementById(this.fromid);
if (fromel) {
- 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 handleValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
handleValue(animobj, value) {
if (!this.triggered) {
//not triggered - check if animation should start
if (value > this.limit) {
animobj.startAnimation(this.aname);
- 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 attached
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
attached() {
let maxlength = 4 + this.max.length + ((this.step && this.step.toString().includes('.')) ? this.step.toString().length : 1);
this.refnumber.style = 'width:' + maxlength + 'ch';
if (this.fromid) {
if (this.operation.length == 0) {
- 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"