FrenchYeti/dexcalibur

View on GitHub
src/DexcaliburProject.js

Summary

Maintainability
D
2 days
Test Coverage

File DexcaliburProject.js has 402 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var Process = require("child_process");
const _path_ = require("path");
const Fs = require("fs");

var Logger = require("./Logger.js")();
Severity: Minor
Found in src/DexcaliburProject.js - About 5 hrs to fix

    DexcaliburProject has 32 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DexcaliburProject
    {
    
        /**
         * 
    Severity: Minor
    Found in src/DexcaliburProject.js - About 4 hrs to fix

      Function fullscan has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          async fullscan( pPath){
              let elemnt=null;
              let success  = false;
      
              // scan OS/Platform
      Severity: Major
      Found in src/DexcaliburProject.js - About 2 hrs to fix

        Function load has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            static load( pContext, pProjectUID, pConfigPath = null){
                
                let project = new DexcaliburProject( pContext, pProjectUID);
                let data = null;
        
        
        Severity: Minor
        Found in src/DexcaliburProject.js - About 1 hr to fix

          Function synchronizePlatform has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              async synchronizePlatform( pName){
                  let pm = PlatformManager.getInstance(), res=false;
          
                  // select platform
                  switch(pName){
          Severity: Minor
          Found in src/DexcaliburProject.js - About 1 hr to fix

            Function init has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                init(){
                    let im = InspectorManager.getInstance();
            
                    // init config
                    // TODO remove engine configuration
            Severity: Minor
            Found in src/DexcaliburProject.js - About 1 hr to fix

              Function synchronizePlatform has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  async synchronizePlatform( pName){
                      let pm = PlatformManager.getInstance(), res=false;
              
                      // select platform
                      switch(pName){
              Severity: Minor
              Found in src/DexcaliburProject.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 load has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  static load( pContext, pProjectUID, pConfigPath = null){
                      
                      let project = new DexcaliburProject( pContext, pProjectUID);
                      let data = null;
              
              
              Severity: Minor
              Found in src/DexcaliburProject.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 fullscan has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  async fullscan( pPath){
                      let elemnt=null;
                      let success  = false;
              
                      // scan OS/Platform
              Severity: Minor
              Found in src/DexcaliburProject.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 usePlatform has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  async usePlatform( pVersion){
                      // old
                      // this.config.platform_target = pVersion;
                      let pm = this.engine.getPlatformManager(), platform = null;
              
              
              Severity: Minor
              Found in src/DexcaliburProject.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