Showing 366 of 552 total issues
Function bind
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
bind(){
super.bind();
this.type = 'scatter';
this.data.labels = [];
this.xrefindex = parseInt(this.xrefindex, 10);
- 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 (stepPlot) {
strategy.drawLine(prevCanvasX, prevCanvasY, point.canvasx, prevCanvasY);
prevCanvasX = point.canvasx;
}
Avoid deeply nested control flow statements. Open
if (stepPlot) {
newYs = [ point.y_bottom, point.y_top ];
prevY = point.y;
} else {
newYs = [ point.y_bottom, point.y_top ];
Avoid deeply nested control flow statements. Open
if (minY > 0) minAxisY = 0;
Avoid deeply nested control flow statements. Open
for (var k = 0; k < annotationCols[col].length; k++) {
if (k) ann.text += "\n";
ann.text += data.getValue(i, annotationCols[col][k]);
}
Function attached
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
attached() {
//disable animation if enabled from previous
console.log('adobeobj attached()');
if (window.ani) this.disableAnimation();
if (this.responsive && (typeof this.responsive === 'string')) this.responsive = this.responsive==='true';
- 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 (!Dygraph.isOK(point.y)) {
prevX = NaN;
continue;
}
Avoid deeply nested control flow statements. Open
for (j = Math.max(0, i - rollPeriod + 1); j < i + 1; j++) {
y = originalData[j][1];
if (y === null || isNaN(y)) continue;
num_ok++;
sum += originalData[j][1];
Avoid deeply nested control flow statements. Open
if (prev[1][1] !== null && !isNaN(prev[1][1])) {
low -= prev[1][0];
mid -= prev[1][1];
high -= prev[1][2];
count -= 1;
Avoid deeply nested control flow statements. Open
if (actual_y === null) {
series[j] = [x, null];
continue;
}
Avoid deeply nested control flow statements. Open
for (k = 0; k < sum.length; k++) {
y = dataPoint[j][k];
if (y === null || isNaN(y)) continue;
sum[k] += y;
count[k]++;
Avoid deeply nested control flow statements. Open
if (y === null || isNaN(y)) continue;
Avoid deeply nested control flow statements. Open
if (spacing > pixels_per_tick) break;
Avoid deeply nested control flow statements. Open
if (den) {
var p = value < 0 ? 0 : value, n = den;
var pm = sigma * Math.sqrt(p*(1-p)/n + sigma*sigma/(4*n*n));
var denom = 1 + sigma * sigma / den;
low = (p + sigma * sigma / (2 * den) - pm) / denom;
Avoid deeply nested control flow statements. Open
for (j = Math.max(0, i - rollPeriod + 1); j < i + 1; j++) {
y = originalData[j][1][0];
if (y === null || isNaN(y)) continue;
num_ok++;
sum += originalData[j][1][0];
Avoid deeply nested control flow statements. Open
if (currentnavitem.parentNode.parentNode && currentnavitem.parentNode.parentNode.parentNode && currentnavitem.parentNode.parentNode.parentNode.className === 'w3-hide')
if (window.bodylightnavopenhide) window.bodylightnavopenhide(currentnavitem.parentNode.parentNode.parentNode.previousSibling);
Function bind
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
bind() {
//console.log('button.bind()');
this.ids2send = this.ids.split(',');
this.createids = [];
//create those ids not yet in HTML DOM and put them to createids array
- 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 watch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
let watch = (callback) => {
watchCallback = callback || watchCallback;
// watch every glob individually
for(let watcher of watches) {
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
this.handleValueChange = e => {
//sets data to dataset
//apply value convert among all data
- 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 (value.y) ctx.fillText(value.y.toPrecision(4),x,y);