MitocGroup/deep-framework

View on GitHub

Showing 117 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
Severity: Minor
Found in src/deep-security/lib/IdentityProvider.js - About 3 hrs to fix

    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()`
    Severity: Minor
    Found in src/deep-fs/lib/Local/S3FSRelativeFSExtender.js - About 2 hrs to fix

    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) {
    Severity: Minor
    Found in src/deep-resource/lib/Resource/LocalRequest.js - About 2 hrs to fix

    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');
    Severity: Major
    Found in src/deep-framework/webpack.browser.js - About 2 hrs to fix

      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
      Severity: Minor
      Found in src/deep-db/lib/DynamoDB/EventualConsistency.js - About 2 hrs to fix

        Registry has 24 functions (exceeds 20 allowed). Consider refactoring.
        Open

        export class Registry {
          /**
           * @param {AWS.S3} s3
           * @param {String} bucket
           * @param {String} registryFile
        Severity: Minor
        Found in src/deep-fs/lib/Registry.js - About 2 hrs to fix

          Instance has 24 functions (exceeds 20 allowed). Consider refactoring.
          Open

          export class Instance {
            /**
             * @param {String} name
             * @param {Object} microservice
             */
          Severity: Minor
          Found in src/deep-resource/lib/Resource/Instance.js - About 2 hrs to fix

            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) {
            Severity: Major
            Found in src/deep-db/lib/DynamoDB/AutoScaleDynamoDB.js - About 2 hrs to fix

              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',
              Severity: Major
              Found in src/deep-security/lib/Token.js - About 2 hrs to fix

                File S3FSRelativeFSExtender.js has 258 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Created by AlexanderC on 10/27/15.
                 */
                
                'use strict';
                Severity: Minor
                Found in src/deep-fs/lib/Local/S3FSRelativeFSExtender.js - About 2 hrs to fix

                  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 : '/';
                  
                  
                  Severity: Major
                  Found in src/deep-resource/lib/Resource/Request.js - About 2 hrs to fix

                    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)) {
                    Severity: Minor
                    Found in src/deep-log/lib/Driver/ConsoleDriver.js - About 2 hrs to fix

                    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',
                    Severity: Major
                    Found in src/deep-resource/lib/Resource/Request.js - About 2 hrs to fix

                      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,
                      Severity: Minor
                      Found in src/deep-kernel/lib/Kernel.js - About 1 hr to fix

                        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',
                        Severity: Minor
                        Found in src/deep-resource/lib/Resource/Request.js - About 1 hr to fix

                        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 || {};
                        
                        
                        Severity: Minor
                        Found in src/deep-log/lib/Driver/RUM/AbstractEvent.js - About 1 hr to fix

                        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)) {
                        Severity: Minor
                        Found in src/deep-resource/lib/Resource.js - About 1 hr to fix

                        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!
                        Severity: Minor
                        Found in src/deep-core/lib/Generic/require1k.js - About 1 hr to fix

                          Function generate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          internals.generate = function () {
                          
                            /**
                             * elements separated by forward slash ("/") are alternatives.
                             */
                          Severity: Minor
                          Found in src/deep-validation/lib/Helpers/rfc3986.js - About 1 hr to fix

                            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) {
                            Severity: Minor
                            Found in src/deep-resource/lib/Resource/LocalRequest.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language