Function makedie
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
function makedie(instance: any, ctxt: any) {
ctxt = Object.assign(ctxt, instance.die ? instance.die.context : {})
let diecount = 0
- 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 jsonic_strify
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
function jsonic_strify(val: any, opts: any, depth: number) {
depth++
if (null == val) return 'null'
var type = Object.prototype.toString.call(val).charAt(8)
- 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 make_plugin_key
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function make_plugin_key(plugin: any, origtag: any) {
if (null == plugin) {
throw error('missing_plugin_name')
}
- 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 (null != str) {
out.push(str)
}
Function make_standard_act_log_entry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
actdef: any,
msg: any,
meta: any,
origmsg: any,
ctxt: any
Avoid too many return
statements within this function. Open
return isNaN(val) ? 'null' : val.toString()
Avoid too many return
statements within this function. Open
return '{' + out.join(',') + '}'
Avoid too many return
statements within this function. Open
return '[' + out.join(',') + ']'
Avoid too many return
statements within this function. Open
return valstr
Function place
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
place(this: any, timelimit: any) {
let i = this._list.length
let s = 0
let e = i
- 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"