Showing 220 of 414 total issues
Avoid too many return
statements within this function. Open
return [4 /*yield*/, util_2.promisify(mkdirp)(path.dirname(outputFile))];
Avoid too many return
statements within this function. Open
return kick();
Avoid too many return
statements within this function. Open
return [7 /*endfinally*/];
Avoid too many return
statements within this function. Open
if (!(limit > 0)) return [3 /*break*/, 12];
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return [3 /*break*/, 13];
Avoid too many return
statements within this function. Open
return [3 /*break*/, 11];
Avoid too many return
statements within this function. Open
if (!(limit > 1)) return [3 /*break*/, 10];
Avoid too many return
statements within this function. Open
return [4 /*yield*/, _a.call(stream_1)];
Avoid too many return
statements within this function. Open
return [4 /*yield*/, new Promise(function (resolve) {
func(doc_1, resolve, state);
})];
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return [3 /*break*/, 5];
Avoid too many return
statements within this function. Open
return [2 /*return*/, state.result || partial];
Avoid too many return
statements within this function. Open
if (!doc_1) return [3 /*break*/, 14];
Avoid too many return
statements within this function. Open
return [4 /*yield*/, cursor.next()];
Function logout
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.logout = function (req, res) {
log.info(req.user);
if (aconf.login.stateless) {
res.statusCode = statusCode.BAD_REQUEST;
res.json({result: 'auth mode is stateless'});
- 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 errorHandlers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private errorHandlers(): void {
if(this.config.application.notFound == undefined) {
this.app.use(ExpressMiddlewares.notFoundHandler());
} else {
if(this.config.application.notFound == "disabled") {
- 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 ModelsLoader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var ModelsLoader = /** @class */ (function () {
function ModelsLoader(config, pluginRegistry) {
this._models = {};
ModelsLoader.logger.trace("Creating ModelsLoader instance");
this.config = config;
- 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"