Showing 430 of 684 total issues
Function handleResize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleResize() {
console.log('animateadobe handleResize()');
//do not run if ani.lib is not defined - no adobe component is available
if (!window.ani.lib) return;
let w = window.ani.lib.properties.width; let h = window.ani.lib.properties.height;
Function clear
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype.clear = function() {
var context;
if (this.isIE) {
// VML takes a while to start up, so we just poll every this.IEDelay
try {
Function generateSource
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateSource(className) {
return `import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
Function _evaluateLimits
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphLayout.prototype._evaluateLimits = function () {
//TODO(tomaton): fix xrange when last x value is not the highest in case of x = sin(y) x is from 0 to 1 and back to 0
//and range for x is 0 to 1
this.minxval = this.maxxval = null;
if (this.dateWindow_) {
Function generateSource
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateSource(className) {
return `import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
Function get
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
get() {
this.inProgress = true; // Mark request as in progress
//sends GET request to
let myheaders = new Headers();
//localStorage.setItem('bdl-fhir-url',this.remoteurl);
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
//this.data = [[0, 0, 0]];
//this.data=[[1, 5], [2, 5], [3, 4.9], [4, 4.8], [5, 5.2]];
//create lambda function which is added as listener later
console.log('dygraph chart constructor');
Function afterDraw
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
afterDraw: (chart) => {
const ctx = chart.canvas.getContext('2d');
ctx.save();
Function bind
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
//
let convertvalues = this.value.split(';');
let identity = x => x;
this.operation = [];
Function beforeDatasetsDraw
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
beforeDatasetsDraw: function(chart, easing) {
const acidbaseannotation = [[7.4,40,"Normal area"],
[7.2,64,"Acute Hypercapnia"],
[7.1,35,"Acute Base Deficit"],
[7.1,18,"Chronic Base Deficit"],
Function fromFieldsV7
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
static fromFieldsV7(unixTsMs, randA, randBHi, randBLo) {
if (!Number.isInteger(unixTsMs) ||
!Number.isInteger(randA) ||
!Number.isInteger(randBHi) ||
!Number.isInteger(randBLo) ||
Function mouseMove_
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.mouseMove_ = function(event) {
// This prevents JS errors when mousing over the canvas before data loads.
var points = this.layout_.points;
if (points === 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
Function treatMouseOpAsClick
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) {
var clickCallback = g.attr_('clickCallback');
var pointClickCallback = g.attr_('pointClickCallback');
var selectedPoint = null;
- 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 mapLegacyOptions_
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.mapLegacyOptions_ = function(attrs) {
var my_attrs = {};
for (var k in attrs) {
if (k == 'file') continue;
if (attrs.hasOwnProperty(k)) my_attrs[k] = attrs[k];
- 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 bind
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
bind() {
this.divstyle = `width:${this.width};height:${this.height}; position:relative`;
console.log('bind() moleculeId,hidecontrols,hidepolymer,moleculeidref', this.moleculeId, this.hideControls, this.hidePolymer, this.parentref);
this.pdbref = document.createElement('pdbe-molstar');
if (this.moleculeId) this.pdbref.setAttribute('molecule-id', this.moleculeId);
- 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 convertf2a
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
convertf2a(x) {
//do conversion if operation is defined
if (this.operation) x = this.operation(x);
//initially sets minimum as 1/2 of current value, otherwise update it
if (!this.afminset) {
- 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 bind
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
bind() {
this.isOneshot = this.mode === 'oneshot';
this.isOnestep = this.mode === 'onestep';
if (this.isOnestep) {
this.showcontrols = 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 constructor
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
this.handleValueChange = e => {
//e.detail do not reallocate - using same buffer, thus slicing to append to data array
let rawdata = e.detail.data.slice(this.refindex, this.refendindex);
- 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 destroyAdobe
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
destroyAdobe() {
console.log('animate adobe ss destroy()');
if (this.stage) {
this.stage.enableMouseOver(-1);
this.stage.enableDOMEvents(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 changesrc
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
changesrc(args) {
console.log('markdown-bottom-nav changesrc args:', args);
//console.log('markdown-bottom-nav links:', this.links);
//parse global window.markdownnav.links to get prev and next title
//let prevtitle = '';
- 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"