Showing 430 of 684 total issues
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];
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
Avoid deeply nested control flow statements. Open
if (value.y) ctx.fillText(value.y.toPrecision(4),x,y);
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
for (let answer of answersStruct.answers) {
const aid = answer.charAt(0);
if (aggregatedResults[qid].a[aid])
aggregatedResults[qid].a[aid]++;
else
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
Avoid deeply nested control flow statements. Open
for (animchild of window.ani.exportRoot.children) {
if (typeof animchild.gotoAndStop === 'function')
animchild.gotoAndStop (newValue);
}
Avoid deeply nested control flow statements. Open
for (let answer of answersStruct.answers) {
const aid = answer.charAt(0);
aggregatedResults[qid].a[aid] = 1;
}
Function constructor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
//console.log('animate-adobe constructor()');
//fix issue - some bindings not detached
//window.animatebindings = [];
this.handleValueChange = e => {
- 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 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
Consider simplifying this complex logical expression. Open
if (this.element && this.element.au && this.element.au.controller && typeof (this.element.au.controller) === 'object' && this.element.au.controller.viewModel && typeof (this.element.au.controller.viewModel) === 'object') {
this.elementVM = this.element.au.controller.viewModel;
//check whether this.elementVM has changesrc function - to be called in event listener
//this.isReadMDCustomElement = (typeof this.elementVM.changesrc === 'function');
} else {console.warn('element viewmodel object doesnot exists, cant be called by handleXXX methods')}
Consider simplifying this complex logical expression. Open
if (
(typ != 'object' && !(typ == 'function' &&
typeof(o.item) == 'function')) ||
o === null ||
typeof(o.length) != 'number' ||
Consider simplifying this complex logical expression. Open
if (this.element &&
this.element.au &&
this.element.au.controller &&
typeof (this.element.au.controller) === 'object' &&
this.element.au.controller.viewModel &&
Function doAnimatedZoom
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.prototype.doAnimatedZoom = function(oldXRange, newXRange, oldYRanges, newYRanges, callback) {
Function nonTrivialStrategy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var nonTrivialStrategy = function(renderer, ctx, color, strokeWidth, strokePattern) {
Function getDateAxis
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) {
Function binarySearch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.binarySearch = function(val, arry, abs, low, high) {
Function renderFootnoteAnchor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderFootnoteAnchor(tokens, idx, options, env, slf) {
Function renderFootnoteOpen
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderFootnoteOpen(tokens, idx, options, env, slf) {
Function renderFootnoteRef
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderFootnoteRef(tokens, idx, options, env, slf) {