Showing 114 of 117 total issues
IdentityProvider
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
export class IdentityProvider {
/**
* @param {Object} providers
* @param {String} providerName
* @param {Object} identityMetadata
Function EXTEND_OBJECT
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
get EXTEND_OBJECT() {
let extendObject = {
bucket: 'relative_fs',
path: '',
s3: {}, // @todo: mock `AWS.S3()`
- 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 _send
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
_send(callback = () => {}) {
let actionType = this._action.type;
let securityService = this._action.resource.security;
if (actionType === Action.LAMBDA) {
- 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 exports
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
const webpack = require('webpack');
const path = require('path');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const nullModulePath = path.resolve(__dirname, 'scripts', 'webpack.null-module.js');
Instance
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
export class Instance {
/**
* @param {String} name
* @param {Object} microservice
*/
EventualConsistency
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
export class EventualConsistency {
/**
* @param {AWS.DynamoDB|AWS.DynamoDB.DocumentClient|*} dynamoDb
* @param {AWS.DynamoDB|AWS.DynamoDB.DocumentClient|*} dynamoDbDocumentClient
* @param {Kernel} deepKernel
Registry
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
export class Registry {
/**
* @param {AWS.S3} s3
* @param {String} bucket
* @param {String} registryFile
Function _decorate
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
_decorate(method, payload, originalCb) {
return (error, data) => {
let logger = this._kernel.get('log');
if (error && error.code === AutoScaleDynamoDB.THROUGHPUT_EXCEEDED_ERROR) {
Function loadCredentials
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadCredentials(callback = () => {}, authScope = null) {
let scopeKey = authScope ? authScope.toString() : 'default';
let event = {
service: 'deep-security',
File S3FSRelativeFSExtender.js
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by AlexanderC on 10/27/15.
*/
'use strict';
Function _createAws4SignedRequest
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
_createAws4SignedRequest(url, httpMethod, payload, headers, callback) {
let parsedUrl = urlParse(url, qs);
let apiHost = parsedUrl.hostname;
let apiPath = parsedUrl.pathname ? parsedUrl.pathname : '/';
Function overrideNative
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
overrideNative(logTime = true, coloredOutput = true, turnOff = false) {
let nativeConsole = ConsoleDriver.nativeConsole;
for (let i in ConsoleDriver.METHODS_TO_OVERRIDE) {
if (!ConsoleDriver.METHODS_TO_OVERRIDE.hasOwnProperty(i)) {
- 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 _send
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
_send(callback = () => {}) {
let logService = this.action.resource.log;
let requestEvent = {
service: 'deep-resource',
resourceType: 'Browser',
Function _buildContainer
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildContainer(callback) {
this._env = this._config.env;
this._container.addParameter(
Kernel.KERNEL,
Function _send
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
_send(callback = () => {}) {
let logService = this.action.resource.log;
let requestEvent = {
service: 'deep-resource',
resourceType: 'Browser',
- 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 boot
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
boot(kernel, callback) {
let resourcesVector = [];
for (let microserviceKey in kernel.microservices) {
if (!kernel.microservices.hasOwnProperty(microserviceKey)) {
- 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 _enrichWithContextData
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
_enrichWithContextData(event) {
event.eventLevel = this.getEventLevel();
event.time = event.time || new Date().getTime();
event.metadata = event.metadata || {};
- 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 deepLoad
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deepLoad(module, callback, parentLocation, id) {
// If this module is already loading then don't proceed.
// This is a bug.
// If a module is requested but not loaded then the module isn't ready,
// but we callback as if it is. Oh well, 1k!
Function generate
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
internals.generate = function () {
/**
* elements separated by forward slash ("/") are alternatives.
*/
Function _send
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
_send(callback = () => {}) {
let actionType = this._action.type;
let securityService = this._action.resource.security;
if (actionType === Action.LAMBDA) {