Showing 162 of 258 total issues
Function verify
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
etl.verify = function(context, workspace, collection, documents, callback) {
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
run: function (context, workspace, collection, document, callback) {
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
run: function (context, workspace, collection, payload, callback) {
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
run: function (context, workspace, collection, metric, callback) {
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
run: function (context, workspace, role, payload, callback) {
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
run: function (context, workspace, collection, dimension, callback) {
Function run
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
run: function (context, workspace, username, password, callback) {
Function validateRoute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
auth.validateRoute = function (req, modulename, action, callback) {
if (!callback) {
callback = action;
action = modulename;
modulename = req;
- 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 too many return
statements within this function. Open
Open
return {
start: new Date(_startdate),
end: new Date(_enddate)
};
Avoid too many return
statements within this function. Open
Open
return {
last_n_items: parseInt(m[1], 10)
};
Avoid too many return
statements within this function. Open
Open
return process.nextTick(function () {
return callback(null, _action);
});
Avoid too many return
statements within this function. Open
Open
return {
start: new Date(_startdate),
end: new Date(_enddate)
};
Avoid too many return
statements within this function. Open
Open
return {
start: new Date(_startdate),
end: new Date(_enddate)
};
Avoid too many return
statements within this function. Open
Open
if (obj.constructor == (new RegExp).constructor) return "regex";
Avoid too many return
statements within this function. Open
Open
return {
start: new Date(_startdate),
end: new Date(_enddate)
};
Avoid too many return
statements within this function. Open
Open
return localRoute(req, res);
Avoid too many return
statements within this function. Open
Open
return {
start: new Date(_startdate),
end: new Date(_enddate)
};
Avoid too many return
statements within this function. Open
Open
return process.nextTick(function () {
return callback(new AuthErrorTemplate('Failed to validate token [2] [' + token + ']'));
});
Avoid too many return
statements within this function. Open
Open
return {
start: new Date(_startdate),
end: new Date(_enddate)
};
Avoid too many return
statements within this function. Open
Open
return router.responseSuccess(result, headers, req, res);