oglimmer/fulgens

View on GitHub

Showing 21 of 57 total issues

Function exec has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  exec(softwareComponentName, userConfig, runtimeConfiguration) {
    super.exec(softwareComponentName, userConfig, runtimeConfiguration);

    const { Name: systemName } = userConfig.config;
    const { Deploy, Lib, EnvVars = [], SourceTypes = ['docker','download','local'], DockerImage = 'tomee', ExposedPort = '8080', DockerMemory } = userConfig.software[softwareComponentName];
Severity: Major
Found in classes/plugins/TomeePlugin.js - About 3 hrs to fix

    Function exec has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      exec(softwareComponentName, userConfig, runtimeConfiguration) {
        super.exec(softwareComponentName, userConfig, runtimeConfiguration);
    
        const { Name: systemName } = userConfig.config;
        const { Deploy, Lib, EnvVars = [], SourceTypes = ['docker','download','local'], DockerImage = 'tomcat', ExposedPort = '8080', DockerMemory } = userConfig.software[softwareComponentName];
    Severity: Major
    Found in classes/plugins/TomcatPlugin.js - About 3 hrs to fix

      Function exec has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

        exec(softwareComponentName, userConfig, runtimeConfiguration) {
          if (userConfig.software[softwareComponentName]) {
            const { Git, Param, Dir, BeforeStart, AfterStart } = userConfig.software[softwareComponentName];
      
            if (Param) {
      Severity: Minor
      Found in classes/plugins/BasePlugin.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 exec has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        exec(softwareComponentName, userConfig, runtimeConfiguration) {
          super.exec(softwareComponentName, userConfig, runtimeConfiguration);
      
          const { Name: systemName } = userConfig.config;
          const { Start, Node, EnvVars = [], ExposedPort = '3000', BeforeBuild = [], AfterBuild = [], DockerImage = 'node', DockerMemory } = userConfig.software[softwareComponentName];
      Severity: Major
      Found in classes/plugins/NodePlugin.js - About 2 hrs to fix

        Function exec has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          exec(softwareComponentName, userConfig, runtimeConfiguration) {
            if (userConfig.software[softwareComponentName]) {
              const { Git, Param, Dir, BeforeStart, AfterStart } = userConfig.software[softwareComponentName];
        
              if (Param) {
        Severity: Major
        Found in classes/plugins/BasePlugin.js - About 2 hrs to fix

          Function exec has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            exec(softwareComponentName, userConfig, runtimeConfiguration) {
              super.exec(softwareComponentName, userConfig, runtimeConfiguration);
          
              const { Name: systemName, JavaVersions } = userConfig.config;
              const { Start, ExposedPort, EnvVars = [], DockerImage = 'openjdk', DockerMemory } = userConfig.software[softwareComponentName];
          Severity: Major
          Found in classes/plugins/JavaPlugin.js - About 2 hrs to fix

            Function exec has 53 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              exec(softwareComponentName, userConfig, runtimeConfiguration) {
                super.exec(softwareComponentName, userConfig, runtimeConfiguration);
            
                const { Name: systemName } = userConfig.config;
                const { Start, ExposedPort, DockerImage = 'ubuntu', EnvVars = [], DockerMemory } = userConfig.software[softwareComponentName];
            Severity: Major
            Found in classes/plugins/ShellPlugin.js - About 2 hrs to fix

              Function exec has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                exec(softwareComponentName, userConfig, runtimeConfiguration) {
                  super.exec(softwareComponentName, userConfig, runtimeConfiguration);
              
                  const { Name: systemName } = userConfig.config;
                  const { Mysql, EnvVars = [], DockerImage = 'mysql', ExposedPort = '3306', DockerMemory } = userConfig.software[softwareComponentName];
              Severity: Minor
              Found in classes/plugins/MysqlPlugin.js - About 1 hr to fix

                Function exec has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  exec(softwareComponentName, userConfig, runtimeConfiguration) {
                    super.exec(softwareComponentName, userConfig, runtimeConfiguration);
                
                    const { Name: systemName } = userConfig.config;
                    const { CouchDB, EnvVars = [], DockerImage = 'couchdb', ExposedPort = '5984', DockerMemory } = userConfig.software[softwareComponentName];
                Severity: Minor
                Found in classes/plugins/CouchdbPlugin.js - About 1 hr to fix

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

                    exec(softwareComponentName, userConfig, runtimeConfiguration) {
                      super.exec(softwareComponentName, userConfig, runtimeConfiguration);
                  
                      const { Name: systemName } = userConfig.config;
                      const { EnvVars = [], DockerImage = 'redis', ExposedPort = '6379', DockerMemory } = userConfig.software[softwareComponentName];
                  Severity: Minor
                  Found in classes/plugins/RedisPlugin.js - About 1 hr to fix

                    Function exec has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      exec(softwareComponentName, userConfig, runtimeConfiguration) {
                        super.exec(softwareComponentName, userConfig, runtimeConfiguration);
                        
                        const { JavaVersions, UseHomeM2 } = userConfig.config;
                        const { DockerImage = 'maven' } = userConfig.software[softwareComponentName];
                    Severity: Minor
                    Found in classes/plugins/MvnPlugin.js - About 1 hr to fix

                      Function exec has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        exec(softwareComponentName, userConfig, runtimeConfiguration) {
                          super.exec(softwareComponentName, userConfig, runtimeConfiguration);
                          
                          const { DockerImage = 'node' } = userConfig.software[softwareComponentName];
                      
                      
                      Severity: Minor
                      Found in classes/plugins/NpmPlugin.js - About 1 hr to fix

                        Function createFile has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          createFile() {
                            // start with loading default content if given
                            var content = [];
                            if (this.LoadDefaultContent) {
                              var contentBlock;
                        Severity: Minor
                        Found in classes/core/configFile/BaseConfigFile.js - About 1 hr to fix

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

                            getAptBuild() {
                              if (this.aptPackages.size == 0) {
                                return ';';
                              }
                              // aptDebian8 contains all packages supposed to be install on Debian 8.x
                          Severity: Minor
                          Found in classes/core/DependencyManager.js - About 1 hr to fix

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

                              exec(softwareComponentName, userConfig, runtimeConfiguration) {
                                super.exec(softwareComponentName, userConfig, runtimeConfiguration);
                                
                                const { JavaVersions, UseHomeM2 } = userConfig.config;
                                const { DockerImage = 'maven' } = userConfig.software[softwareComponentName];
                            Severity: Minor
                            Found in classes/plugins/MvnPlugin.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 getAptBuild has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                              getAptBuild() {
                                if (this.aptPackages.size == 0) {
                                  return ';';
                                }
                                // aptDebian8 contains all packages supposed to be install on Debian 8.x
                            Severity: Minor
                            Found in classes/core/DependencyManager.js - About 55 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

                            Function createFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                              createFile() {
                                // start with loading default content if given
                                var content = [];
                                if (this.LoadDefaultContent) {
                                  var contentBlock;
                            Severity: Minor
                            Found in classes/core/configFile/BaseConfigFile.js - About 35 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

                            Function addDetails has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                              addDetails(componentName, DefaultType, detailsArray) {
                                const op = this.dataDetails.find(e => e.componentName === componentName);
                                if (op) {
                                  detailsArray.forEach(e => op.detailsArray.push(e));
                                } else {
                            Severity: Minor
                            Found in classes/phase/options.js - About 35 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

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

                              const child = execFile('shfmt', (error, stdout, stderr) => {
                                if (error) {
                                  console.log(renderedOutput);
                                } else {
                                  if (stderr) {
                            Severity: Minor
                            Found in fulgens.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

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

                              exec(softwareComponentName, userConfig, runtimeConfiguration) {
                                super.exec(softwareComponentName, userConfig, runtimeConfiguration);
                                
                                const { DockerImage = 'node' } = userConfig.software[softwareComponentName];
                            
                            
                            Severity: Minor
                            Found in classes/plugins/NpmPlugin.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

                            Severity
                            Category
                            Status
                            Source
                            Language