Showing 15 of 21 total issues
Function encapsulateRunInstance
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
function encapsulateRunInstance(instanceApi, taskEvents, resolveReject, promise) {
var ctx = this, // jshint ignore:line
thisTask = ctx.task,
parentTask = ctx.parentTask,
- 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
Function encapsulateRunInstance
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function encapsulateRunInstance(instanceApi, taskEvents, resolveReject, promise) {
var ctx = this, // jshint ignore:line
thisTask = ctx.task,
parentTask = ctx.parentTask,
- Create a ticketCreate a ticket
Function proceedDescriptionFn
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function proceedDescriptionFn(instanceApi) {
var ctx = this, // jshint ignore:line
thisTask = ctx.task,
descriptionFn = ctx.descriptionFn;
- 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
Function proceedBodyFn
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function proceedBodyFn(instanceApi, isFirstTime) {
if (config.trace) {
console.log('inside proceedBodyFn', this.id, new Date() - 0); // jshint ignore:line
console.log('isFirstTime', isFirstTime);
- Create a ticketCreate a ticket
Function translateRangeSet
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function translateRangeSet(rangeSet) {
var rangeLength = rangeSet.length,
last = rangeLength - 1,
lastIsBool = type.isBoolean(rangeSet[last]),
step;
- 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
Function proceedDescriptionFn
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function proceedDescriptionFn(instanceApi) {
var ctx = this, // jshint ignore:line
thisTask = ctx.task,
descriptionFn = ctx.descriptionFn;
- Create a ticketCreate a ticket
Function parseRangeArgs
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function parseRangeArgs(args, preventRecursion) {
var result = [],
current = [],
item,
isArrayFlag;
- 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
Function canAdvance
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Range.prototype.canAdvance = function canAdvance(justCheck) {
var currentR = 0,
ranges = this.data,
maxR = ranges.length,
range,
- 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
Function staticReduce
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function staticReduce(arr, memo, taskBody, taskTail) {
return new CrunchTask(function (init, body, fin) {
var ranges,
- Create a ticketCreate a ticket
Function protoRun
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function protoRun(descriptionFn, taskEvents) {
var thisTask = this; // jshint ignore:line
var parentTask = globals.staticParentTask;
globals.staticParentTask = null;
- Create a ticketCreate a ticket
Function translateRangeSet
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function translateRangeSet(rangeSet) {
var rangeLength = rangeSet.length,
last = rangeLength - 1,
lastIsBool = type.isBoolean(rangeSet[last]),
step;
- Create a ticketCreate a ticket
Function staticForEach
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function staticForEach(arr, taskBody, taskTail) {
return new CrunchTask(function (init, body, fin) {
var ranges,
ptr,
- Create a ticketCreate a ticket
Function _trigger
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function _trigger(hive, evt /*, args*/) {
var args1 = __slice.call(arguments, 2);
if (!hive[evt]) {
return;
}
- 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
Function _fnBindAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function _fnBindAll(ctx, target, source) {
var method;
for (var prop in source) {
//noinspection JSUnfilteredForInLoop
- 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
Function _config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
config: function _config(obj) {
if (!type.isObject(obj)) {
return _config(defaultConfig);
}
var result = {};
- 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"