Showing 430 of 684 total issues
Function updateOptions
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.updateOptions = function(input_attrs, block_redraw) {
if (typeof(block_redraw) == 'undefined') block_redraw = false;
// mapLegacyOptions_ drops the "file" parameter as a convenience to us.
var file = input_attrs.file;
- 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 parseArray_
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.parseArray_ = function(data) {
// Peek at the first x value to see if it's numeric.
if (data.length === 0) {
this.error("Can't plot empty data set");
return 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 addAnswer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
addAnswer(qid2,answer){
let qid = qid2;
if (qid2.includes(';')) qid = qid2.split(';')[0]; //first is id second is id of related tabs
if (this.quizids.includes(qid2)) {
let item = this.qas.find(item => item.id === qid);
- 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 initAdobe
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
initAdobe() {
console.log('animateadobe initAdobe()');
//search for composition which has the 'name' in library
for (let cid of Object.keys(window.AdobeAn.compositions)) {
let comp = window.AdobeAn.getComposition(cid);
- 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 _drawSeries
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype._drawSeries = function(
ctx, iter, strokeWidth, pointSize, drawPoints, drawGapPoints,
stepPlot, strategy) {
var prevCanvasX = null;
File fb-config.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* firebase configuration
* subscribe to fb-get-message channel to get broadcasted messages from firebase
* send message to fb-send-message channel to sned the message to firebase
*/
Function initfmi
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
initfmi() {
console.log('fmi initfmi()');
let that = {};
/* global/local fminame */
Function constructor
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(){
super();
this.handleValueChange = e => {
//let j = this.currentdataset;
//all values from refindex to one dataset - as one curve
Function generateLegendHTML
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
var generateLegendHTML = function(g, x, sel_points, oneEmWidth) {
// TODO(danvk): deprecate this option in place of {legend: 'never'}
if (g.getOption('showLabelsOnHighlight') !== true) return '';
// If no points are selected, we display a default legend. Traditionally,
Function bind
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
async bind() {
let firebaseConfig;
console.log('FBconfig.bind()');
if (!window.userid) {
let storeduuid = localStorage.getItem('deviceUUID');
Function _renderChartLabels
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype._renderChartLabels = function() {
var div, class_div;
// Generate divs for the chart title, xlabel and ylabel.
// Space for these divs has already been taken away from the charting area in
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
bind() {
//
let convertvalues = this.value.split(';');
let identity = x => x;
this.operation = [];
- 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 clear
has a Cognitive Complexity of 15 (exceeds 5 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 {
- 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 setColors_
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.setColors_ = function() {
var num = this.attr_("labels").length - 1;
this.colors_ = [];
var colors = this.attr_('colors');
var i;
- 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 handleResize
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
handleResize() {
console.log('animateadobe handleResize()');
//do not run if ani.lib is not defined - no adobe component is available
if (!this.lib) return;
let w = this.lib.properties.width; let h = this.lib.properties.height;
- 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 handleResize
has a Cognitive Complexity of 15 (exceeds 5 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;
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
constructor(){
super();
this.handleValueChange = e => {
//let j = this.currentdataset;
//all values from refindex to one dataset - as one curve
- 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 startSimulation
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
startSimulation() {
this.animationstarted = true;
this.fpsInterval = 1000 / (isNaN(this.fpslimit) ? parseInt(this.fpslimit, 10) : this.fpslimit);
this.then = window.performance.now();
//read input values
- 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 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
attached() {
//register horizontal line drawing, shows difference line between appropriate points from dataset0 and dataset1
Chart.pluginService.register({
beforeDraw: function(chart, ease) {
if (chart.config.options.XYPlugin && chart.tooltip._active && chart.tooltip._active.length) {
Function handleValueChange
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.handleValueChange = e => {
//let j = this.currentdataset;
//all values from refindex to one dataset - as one curve
//if (!this.chart.data.datasets[j]) {
//do initialize dataset first