runner/setup.go

Summary

Maintainability
C
1 day
Test Coverage

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

    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 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 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 setupScratch has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              runID string,
              projectDir string,
              scratchRoot string,
              cleanup *Cleanup,
              keepWorkspace bool,
          Severity: Minor
          Found in runner/setup.go - About 35 mins to fix

            Function reportError has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                ctx context.Context,
                logger logging.Logger,
                prefix *logging.Prefix,
                format string,
                args ...interface{},
            Severity: Minor
            Found in runner/setup.go - About 35 mins to fix

              exported function SetupRunner should have comment or be unexported
              Open

              func SetupRunner(
              Severity: Minor
              Found in runner/setup.go by golint

              There are no issues that match your filters.

              Category
              Status