MitocGroup/deep-framework

View on GitHub
src/deep-kernel/lib/Kernel.js

Summary

Maintainability
D
2 days
Test Coverage

Kernel has 51 functions (exceeds 20 allowed). Consider refactoring.
Open

export class Kernel {
  /**
   * @param {Array} deepServices
   * @param {String} context
   */
Severity: Major
Found in src/deep-kernel/lib/Kernel.js - About 7 hrs to fix

    File Kernel.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Created by mgoria on 5/26/15.
     */
    
    /*eslint no-proto: 0*/
    Severity: Minor
    Found in src/deep-kernel/lib/Kernel.js - About 5 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 bootstrap has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          bootstrap(callback) {
            let rumEvent = {
              service: 'deep-kernel',
              resourceType: 'Lambda',
              eventName: 'KernelLoad',
        Severity: Minor
        Found in src/deep-kernel/lib/Kernel.js - About 1 hr to fix

          Function loadAsyncConfig has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            loadAsyncConfig(cb) {
              if (this._asyncConfigCache) {
                cb(this._asyncConfigCache);
          
                return this;
          Severity: Minor
          Found in src/deep-kernel/lib/Kernel.js - About 1 hr to fix

            Function microservice has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              microservice(identifier = null) {
                if (!identifier) {
                  identifier = this._config.microserviceIdentifier;
                }
            
            
            Severity: Minor
            Found in src/deep-kernel/lib/Kernel.js - About 25 mins 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

            There are no issues that match your filters.

            Category
            Status