Showing 14,752 of 14,752 total issues
Avoid deeply nested control flow statements. Open
Open
if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if(dialog.inputs[keys[indexx]].input.trigger){
dialog.inputs[keys[indexx]].input.trigger('change');
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (m.attributes) {
for (var attr in m.attributes)
{ (attributes || (attributes = {}))[attr] = m.attributes[attr]; }
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( param.dataType.toLowerCase() === 'double' ) {
let decimals = param.value.substring( param.value.indexOf( '.' ) + 1 ).length;
for ( let j = 0; j < decimals; j++ ) {
step = step / 10;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (sp.to != null && sp.to != pos && nextChange > sp.to) {
nextChange = sp.to;
spanEndStyle = "";
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (m.className) { spanStyle += " " + m.className; }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
{ if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (dir < 0 ? preventCursorRight : preventCursorLeft)
{ near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
{ if (oldCur[k].marker == span.marker) { continue spans } }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
else if ( col.field == 'executionTime' ) {
data = O._executionTimes[identifier]? O._executionTimes[identifier] :"";
}
else if ( col.field == 'uploadDate' ) {
data = O._uploadDates[identifier]? O._uploadDates[identifier] :"";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if(modelMetadata['generalInformation']['modelCategory']){
data = modelMetadata['generalInformation']['modelCategory']['modelClass'] ?
modelMetadata['generalInformation']['modelCategory']['modelClass'] : "Generic model";
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( param.unit && param.unit != '[]' && param.unit != 'Others' ) {
let $append = $( '<div class="input-group-text"></div>' )
.text( param.unit )
.insertAfter( $inputControl )
.wrap( '<div class="input-group-append"></div>' )
- Create a ticketCreate a ticket
Function _updateFilter
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
async _updateFilter() {
let O = this;
_log( 'TABLE MAIN / _updateFilter' );
O._filtered = []; // stores all hidden/filtered rows
- Read upRead up
- Create a ticketCreate a ticket
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
Open
if (cut$1) {
display.view = display.view.slice(0, cut$1.index);
display.viewTo = cut$1.lineN;
} else {
resetView(cm);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
if (indexOf(newGroup, Number(m[1])) > -1) {
lst(newChanges)[prop] = change[prop];
delete change[prop];
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( param.dataType.toLowerCase() === 'double' ) {
let decimals = param.value.substring(param.value.indexOf('.') + 1).length;
for ( let j = 0; j < decimals; j++ ) {
step = step / 10;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
} else if (sp.from > pos && nextChange > sp.from) {
nextChange = sp.from;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( field.param.minValue && parseFloat( field.param.minValue ) > fieldValue ) {
return {
input : field.input,
msg : 'Invalid value. Value is lower than minimal value: '+ field.param.minValue
};
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for (const element of cellData) {
element.includes(val.trim()) ? cellMatches = true : null;
}
- Create a ticketCreate a ticket