Function do_act
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
do_act: function (instance, opts, origmsg, origreply) {
let timedout = false;
const actmsg = intern.make_actmsg(origmsg);
const meta = new meta_1.Meta(instance, opts, origmsg, origreply);
// Gated actions must complete before further actions can start.
- 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 handle_inward_break
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
handle_inward_break: function (inward, act_instance, data, actdef, origmsg) {
if (!inward)
return false;
const msg = data.msg;
const reply = data.reply;
- 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 execute_action
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
execute_action: function (execspec, act_instance, opts, actctxt, msg, meta, reply) {
Function handle_reply
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
handle_reply: function (opts, meta, actctxt, actmsg, err, out, reply_meta) {
Function handle_reply
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
handle_reply: function (opts, meta, actctxt, actmsg, err, out, reply_meta) {
meta.end = Date.now();
const delegate = actctxt.seneca;
const reply = actctxt.reply;
const 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
Function handle_inward_break
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
handle_inward_break: function (inward, act_instance, data, actdef, origmsg) {
Function execute_action
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
execute_action: function (execspec, act_instance, opts, actctxt, msg, meta, reply) {
const private$ = act_instance.private$;
const actdef = meta.prior
? private$.actdef[meta.prior]
: act_instance.find(msg);
- 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 process_outward
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
process_outward: function (actctxt, data) {
const act_instance = actctxt.seneca;
const outwardres = act_instance.order.outward.execSync(actctxt, data);
if (outwardres.err) {
throw outwardres.err;
- 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"