Showing 446 of 948 total issues
Avoid deeply nested control flow statements. Open
if(f==0)
this.pcmaker.push(`try{`);
else
this.pcmaker.push(`${CR}try{`);
Avoid deeply nested control flow statements. Open
if(next.hasPredecessor(blocks[i])==false){
next.addPredecessor(blocks[i]);
}
Avoid deeply nested control flow statements. Open
if(vArg.hasConcrete()){
v+= this.vm.pcmaker.renderConcrete(vArg);
}else{
v+= rArg;
}
Avoid deeply nested control flow statements. Open
if(regX.hasCode()){
this.stack.setLocalSymbol(
regV,
DTYPE.IMM_NUMERIC,
null,
Avoid deeply nested control flow statements. Open
if(regV.getValue() instanceof VM_ClassInstance){
v = `// ${regX}=(ClassInstance)${regV.getValue().parent.name} is not null, so "if(${regX} == 0)" was FALSE. Continue ...`;
//v = `${indent}if( ${regV.getValue().getConcrete()} != null ) ${label}`;
Function constructor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
constructor(config=null){
// the manifest data are stored here
this.attr = {};
- 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 table
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
table: function(header,array){
let out = "|", sep= "|";
for(let i in header){
out += header[i]+"|";
sep += "--|";
- 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
else if(instr[k].opcode.type == CONST.INSTR_TYPE.RET){
//Logger.debug(`Block ${i} RETURN`)
jump = true;
}
Avoid deeply nested control flow statements. Open
if(f>0){
//ssmali.push(`${bbs.getCatchLabel()}:`);
this.pcmaker.push(`:${bbs.getCatchLabel()}`);
}else{
this.pcmaker.push(`${CR}${bbs.getCatchLabel()}`);
Avoid deeply nested control flow statements. Open
if(bbs.hasMultiplePredecessors()){
if(f>0)
this.pcmaker.push(`:goto_${bbs.getGotoLabel()}:`);
else{
this.pcmaker.push(`${CR}goto_${bbs.getGotoLabel()}:`);
Avoid deeply nested control flow statements. Open
if(d != null){
devs[this.devices[i].uid] = this.devices[i];
}
Avoid deeply nested control flow statements. Open
if(d == null){
devs[this.devices[i].uid] = this.devices[i];
}
Avoid deeply nested control flow statements. Open
if(pArguments["p"+i].val != null){
if(getDataTypeOf(margs[i])==DTYPE.ARRAY){
// parse array string
arr = VM_VirtualArray.fromString( margs[i].type, pArguments["p"+i].val);
Function constructor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
constructor(config=null){
// the manifest data are stored here
this.attr = {};
- 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(config=null){
// the manifest data are stored here
this.attr = {};
- 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(blocks[i+1].hasPredecessor(blocks[i])==false){
blocks[i+1].addPredecessor(blocks[i]);
}
Avoid deeply nested control flow statements. Open
if(this.stack.callstack.length==1) this.pcmaker.turnOff();
Avoid deeply nested control flow statements. Open
if(next.hasPredecessor(blocks[i])==false){
next.addPredecessor(blocks[i]);
}
Avoid deeply nested control flow statements. Open
if(arg.name != meths[i].args[j]._name)
ok=false;
Function getInstance
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function getInstance(config=null, override=false){
if(loggerInstance===null || override){
if(config===null){
config={
testMode: false,
- 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"