Showing 204 of 440 total issues
Function factory
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
function factory(assert, _, injector, Errors, Constants) {
function FileStreamer() {
this.injectorMap = {
FileSystem: 'Files.FS'
Function factory
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
function factory(Promise, Errors, waterline, uuid, assert, _, fs) {
fs = Promise.promisifyAll(fs);
function FileManager(config) {
Function httpServiceFactory
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
function httpServiceFactory(
eventsProtocol,
configuration,
lookupService,
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 dataFactory
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
var dataFactory = function(identifier, dataName) {
switch(dataName) {
case 'catData':
return nodeApi.getNodeCatalogSourceById(identifier, 'ohai')
.then(function(catalog) {
Function NodeFactory
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
function NodeFactory (
Promise,
Serializable,
ObmSerializable,
SnmpSerializable,
Function pollerApiServiceFactory
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pollerApiServiceFactory(
waterline,
taskProtocol,
Errors,
_,
File update-service.js
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright © 2017 Dell Inc. or its subsidiaries. All Rights Reserved.
'use strict';
var xmlParser = require('xml2js').parseString;
Function listSystemEthernetInterfacesById
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
var listSystemEthernetInterfacesById = controller(function(req, res) {
var identifier = req.swagger.params.identifier.value;
var index = req.swagger.params.index.value;
return redfish.getVendorNameById(identifier)
Function NotificationApiServiceFactory
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function NotificationApiServiceFactory(
eventsProtocol,
Logger,
waterline,
Errors,
- 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 prepareGrunt
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepareGrunt(grunt) {
var allFiles = [
'package.json',
'Gruntfile.js',
'lib/**/*.js',
File swagger-api-service.js
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2016, EMC, Inc.
'use strict';
var di = require('di');
Function selTranslator
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
var selTranslator = function(selArray, identifier) {
var dateRegex = /(\d{1,2})\/(\d{1,2})\/(\d{4})/;
var timeRegex = /(\d{1,2}):(\d{1,2}):(\d{1,2})/;
var ipmiEventTypeMap = {
'Asserted': 'Assert',
Function getChassis
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getChassis = controller(function(req, res) {
var chassisId = req.swagger.params.identifier.value.split('.')[0];
var systemId = req.swagger.params.identifier.value.split('.')[1];
var typeEnum = [
"Rack",
File http-service.js
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2015, EMC, Inc.
'use strict';
var di = require('di');
Function staticFilesApiServiceFactory
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
function staticFilesApiServiceFactory(
constants,
Logger,
Promise,
configuration,
Function addVolume
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
var addVolume = controller(function(req,res) {
var identifier = req.swagger.params.identifier.value;
var payload = req.swagger.params.payload.value;
var graphName = 'Graph.Dell.Wsman.Add.Volume';
var graphOptions = {
Function schemaApiServiceFactory
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
function schemaApiServiceFactory(
configuration,
Logger,
Promise,
_,
Function create
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function create(__, ___, injector) {
injector = injector || require('../../index.js').injector;
var _ = injector.get('_');
var swaggerService = injector.get('Http.Services.Swagger');
var conf = injector.get('Services.Configuration');
- 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 getManager
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
var getManager = controller(function(req, res) {
var identifier = req.swagger.params.identifier.value;
var options = redfish.makeOptions(req, res, identifier);
return redfish.getVendorNameById(identifier)
.catch(function() {return{};})
Function eventCallback
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
var eventCallback = function(events) {
var clients;
if(_.isArray(events.value)) {
return _.forEach(events.value, function(event) {
if(event.reading.sdrType === 'Threshold') {