Showing 100 of 247 total issues
Function loaderFactory
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loaderFactory(store, taskLibrary, Logger, assert, Promise, _) {
var logger = Logger.initialize(loaderFactory);
/**
* File loader class for loading graph definitions off disk, and persisting
Function ServiceGraph
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ServiceGraph(TaskGraph, store, taskGraphProtocol, Constants, Promise, _) {
var exports = {
// Set cancelTaskGraph default timeout
timeout: 5000
};
Function MergeLossyObserver
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
var MergeLossyObserver = (function () {
function MergeLossyObserver(o, concurrentCounter, g) {
this.o = o;
this.g = g;
this.done = false;
Function parse_snmp_show
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def parse_snmp_show(snmpString):
i = 0
nestedArray = 0
parsedString = ""
- 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 createAndRunGraph
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
WorkflowApiService.prototype.createAndRunGraph = function(configuration, nodeId) {
var self = this;
return Promise.try(function() {
if (!configuration.name || !_.isString(configuration.name)) {
throw new Errors.BadRequestError('Graph name is missing or in wrong format');
Function __run
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def __run(self):
"""
Get secure erase progress for secure erase task.
"""
parser_mapper = {
- 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 schemaApiServiceFactory
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function schemaApiServiceFactory(
configuration,
Logger,
Promise,
_,
- 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 NotificationApiServiceFactory
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
function NotificationApiServiceFactory(
eventsProtocol,
Logger,
waterline,
Errors,
Function templateApiServiceFactory
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function templateApiServiceFactory(
Promise,
workflowApiService,
taskProtocol,
eventsProtocol,
File task-runner.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright © 2016-2017 Dell Inc. or its subsidiaries. All Rights Reserved.
'use strict';
var di = require('di');
File workflow-api-service.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright © 2016-2017 Dell Inc. or its subsidiaries. All Rights Reserved.
'use strict';
var di = require('di');
Function leaseExpirationPollerFactory
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function leaseExpirationPollerFactory(
store,
Logger,
assert,
Constants,
Function create_jbod
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def create_jbod(disk_arg, raid_tool):
"""
Create JBOD for each physical disk under a virtual disk.
:param disk_arg: a dictionary contains disk argument
:param raid_tool: tools used for JBOD creation, storcli and perccli are supported
- 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 httpEventMiddleware
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function httpEventMiddleware(req, res, next) {
req._startAt = process.hrtime();
res.locals.ipAddress = remoteAddress(req);
res.locals.scope = ['global'];
res.locals.uuid = uuid.v4();
Function taskApiServiceFactory
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function taskApiServiceFactory(
taskProtocol,
waterline,
Errors,
util,
Function runnerFactory
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runnerFactory(
waterline,
core,
TaskScheduler,
TaskRunner,
Function _render
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _render(viewName, req, res) {
var options;
return Promise.try(function() {
assert.optionalString(viewName);
assert.object(req);
Function runDiscovery
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
ProfileApiService.prototype.runDiscovery = function(node, options) {
var self = this;
var configuration;
Function makeRenderableOptions
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeRenderableOptions(req, res, context, ignoreLookup) {
var scope = res.locals.scope;
var apiServer = util.format('http://%s:%d',
config.get('apiServerAddress'),
config.get('apiServerPort')
Function _addLinksHeader
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _addLinksHeader(req, res, count) {
var skip = req.swagger.query.$skip;
var top = req.swagger.query.$top;
var uriBase = req.url.split('?')[0];