Showing 53 of 348 total issues

Function SetupRunner has 191 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func SetupRunner(
    cfg *config.Config,
    appOptions *options.AppOptions,
    runOptions *options.RunOptions,
) (runner *Runner, err error) {
Severity: Major
Found in runner/setup.go - About 6 hrs to fix

    File run_task.go has 570 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    package runner
    
    import (
        "context"
        "fmt"
    Severity: Minor
    Found in runner/run_task.go - About 3 hrs to fix

      Method Runner.Run has 75 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (r *Runner) Run(plans []string) bool {
          r.logger.Info(
              nil,
              "Beginning run %s",
              r.runID,
      Severity: Minor
      Found in runner/runner.go - About 2 hrs to fix

        Method StageRunner.buildTaskRunnerFunc has 69 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (r *StageRunner) buildTaskRunnerFunc(
            stageTask *config.StageTask,
            index int,
            task config.Task,
            context *RunContext,
        Severity: Minor
        Found in runner/stage.go - About 1 hr to fix

          Method PlanRunner.Run has 63 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (r *PlanRunner) Run(
              context *RunContext,
              name string,
              prefix *logging.Prefix,
          ) bool {
          Severity: Minor
          Found in runner/plan.go - About 1 hr to fix

            Method Config.Translate has 61 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (c *Config) Translate(parent *config.Config) (*config.Config, error) {
                extends, err := util.UnmarshalStringList(c.Extends)
                if err != nil {
                    return nil, err
                }
            Severity: Minor
            Found in loader/jsonconfig/config.go - About 1 hr to fix

              Function LoadFile has 55 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func LoadFile(path string, override *config.Override) (*config.Config, error) {
                  overridePaths, err := getOverridePaths()
                  if err != nil {
                      return nil, fmt.Errorf(
                          "failed to determine override paths: %s",
              Severity: Minor
              Found in loader/loader.go - About 1 hr to fix

                Function NewRunner has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    ctx context.Context,
                    logger logging.Logger,
                    config *config.Config,
                    taskRunnerFactory TaskRunnerFactory,
                    scratch *scratch.ScratchSpace,
                Severity: Major
                Found in runner/runner.go - About 1 hr to fix

                  Function SetupRunner has 11 return statements (exceeds 4 allowed).
                  Open

                  func SetupRunner(
                      cfg *config.Config,
                      appOptions *options.AppOptions,
                      runOptions *options.RunOptions,
                  ) (runner *Runner, err error) {
                  Severity: Major
                  Found in runner/setup.go - About 1 hr to fix

                    Function NewStageRunner has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        ctx context.Context,
                        logger logging.Logger,
                        config *config.Config,
                        taskRunnerFactory TaskRunnerFactory,
                        plan *config.Plan,
                    Severity: Major
                    Found in runner/stage.go - About 1 hr to fix

                      Method Config.Translate has 10 return statements (exceeds 4 allowed).
                      Open

                      func (c *Config) Translate(parent *config.Config) (*config.Config, error) {
                          extends, err := util.UnmarshalStringList(c.Extends)
                          if err != nil {
                              return nil, err
                          }
                      Severity: Major
                      Found in loader/jsonconfig/config.go - About 1 hr to fix

                        Function NewRunTaskRunnerFactory has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            ctx context.Context,
                            cfg *config.Config,
                            runID string,
                            scratch *scratch.ScratchSpace,
                            containerLists *ContainerLists,
                        Severity: Major
                        Found in runner/run_task.go - About 1 hr to fix

                          Function LoadFile has 9 return statements (exceeds 4 allowed).
                          Open

                          func LoadFile(path string, override *config.Override) (*config.Config, error) {
                              overridePaths, err := getOverridePaths()
                              if err != nil {
                                  return nil, fmt.Errorf(
                                      "failed to determine override paths: %s",
                          Severity: Major
                          Found in loader/loader.go - About 55 mins to fix

                            Function runTaskCommandBuilderFactory has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                runID string,
                                config *config.Config,
                                containerOptions *containerOptions,
                                scratch *scratch.ScratchSpace,
                                task *config.RunTask,
                            Severity: Major
                            Found in runner/run_task.go - About 50 mins to fix

                              Method Override.Translate has 7 return statements (exceeds 4 allowed).
                              Open

                              func (o *Override) Translate() (*config.Override, error) {
                                  options, err := o.Options.Translate()
                                  if err != nil {
                                      return nil, err
                                  }
                              Severity: Major
                              Found in loader/jsonconfig/override.go - About 45 mins to fix

                                Function setupLogger has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    cleanup *Cleanup,
                                    scratch *scratch.ScratchSpace,
                                    quiet bool,
                                    verbose bool,
                                    colorize bool,
                                Severity: Minor
                                Found in runner/setup.go - About 45 mins to fix

                                  Function setupRegistries has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      ctx context.Context,
                                      cfg *config.Config,
                                      cleanup *Cleanup,
                                      logger logging.Logger,
                                      env []string,
                                  Severity: Minor
                                  Found in runner/setup.go - About 45 mins to fix

                                    Function newRegistrySet has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        ctx context.Context,
                                        logger logging.Logger,
                                        env environment.Environment,
                                        registries []config.Registry,
                                        factory loginFactory,
                                    Severity: Minor
                                    Found in registry/registry_set.go - About 45 mins to fix

                                      Function newLogger has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          processor *processor,
                                          outStream io.Writer,
                                          outFile io.Writer,
                                          errStream io.Writer,
                                          errFile io.Writer,
                                      Severity: Minor
                                      Found in logging/logger.go - About 45 mins to fix

                                        Method TaskExtendsResolver.resolve has 7 return statements (exceeds 4 allowed).
                                        Open

                                        func (r *TaskExtendsResolver) resolve(task Task) error {
                                            var (
                                                name    = task.GetName()
                                                extends = task.GetExtends()
                                            )
                                        Severity: Major
                                        Found in config/resolver.go - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language