Showing 204 of 440 total issues
Avoid deeply nested control flow statements. Open
if (typeof options.ipv4 !== "undefined") {
delete options.ipv4;
}
Avoid deeply nested control flow statements. Open
} else if (!foundComponent) {
logger.debug("Couldn't compute the match of " + amqpMessage.data.OriginOfCondition);
return amqpMessage;
}
Function pollerApiServiceFactory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
waterline,
taskProtocol,
Errors,
_,
Promise,
Function create
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function create(fittingDef, bagpipes) {
injector = require('../../index.js').injector;
var authz = injector.get('Http.Services.Api.Account');
var swaggerNodeRunner = bagpipes.config.swaggerNodeRunner;
var ready = loadSwagger(authz, swaggerNodeRunner.swagger);
- 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 hookApiServiceFactory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
waterline,
Logger,
_,
Errors,
assert,
Function SshFactory
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function SshFactory (Promise, Serializable, encryption) {
function Ssh (defaults) {
Serializable.call(this, Ssh.schema, defaults);
}
- 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 profileApiServiceFactory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Promise,
Logger,
Errors,
_,
taskgraphService,
Function skuPackServiceFactory
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function skuPackServiceFactory(
_,
waterline,
Logger,
FileLoader,
- 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
Consider simplifying this complex logical expression. Open
if (credentials !== undefined
&& context.request.method === "PUT"
&& context.request.originalUrl === "/api/2.0/ibms"
&& context.request.body.config !== undefined
&& context.request.body.config.user === undefined
Function staticFilesApiServiceFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
constants,
Logger,
Promise,
configuration,
waterline
Function schemaApiServiceFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
configuration,
Logger,
Promise,
_,
nodeFs
Function obmApiServiceFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
waterline,
Logger,
eventsProtocol,
Promise,
_
Function getSoftFwInventory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function getSoftFwInventory(options, identifier, pathsLookups, keyMatch, matchComponent) {
Function factory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function factory(assert, _, injector, Errors, Constants) {
Function tagApiServiceFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
waterline,
Promise,
workflowApiService,
Errors,
_
Function templateApiServiceFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Promise,
Errors,
_,
taskgraphService,
crypto
Function _onMetadata
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var _onMetadata = function(stream, query, filename, id, metadata) {
Function factory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function factory(assert, _, injector, Errors, Constants) {
function FileStreamer() {
this.injectorMap = {
FileSystem: 'Files.FS'
- 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
return waterline.nodes.removeListItemsByIdentifier(node.id, targetsToBeRemoved)
.then(function(modifiedNode){
return self.removeRelation(modifiedNode, type);
});
Avoid too many return
statements within this function. Open
return undefined;