Showing 6,856 of 14,752 total issues
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
Avoid deeply nested control flow statements. Open
Open
if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (m.title) { (attributes || (attributes = {})).title = m.title; }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
{ collapsed = sp; }
- Create a ticketCreate a ticket
Function _refresh
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
async _refresh(index, modelMetadata ) {
let O = this;
let rowData = O._tableData[index];
rowData.modelMetadata = modelMetadata;
let modelName = O._getData( modelMetadata, 'generalInformation', 'name' );
- 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 ( field.param.maxValue && parseFloat( field.param.maxValue ) < fieldValue ) {
return {
input : field.input,
msg : 'Invalid value. Value is higher than maximum value: '+ field.param.maxValue
};
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if(data === "(Data)"){data = "Data model";}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if( ! cellMatches ) {
rowMatchesFilter = false;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (m.explicitlyCleared) {
if (!line.markedSpans) { break }
else {--i; continue}
}
- Create a ticketCreate a ticket