Showing 53 of 344 total issues

Method Plan.AddStage has 6 return statements (exceeds 4 allowed).
Open

func (p *Plan) AddStage(stage *Stage) error {
    if stage.BeforeStage != "" && stage.AfterStage != "" {
        return fmt.Errorf(
            "before_stage and after_stage declared in %s/%s",
            p.Name,
Severity: Major
Found in config/plan.go - About 40 mins to fix

    Function getAWSCredentials has 6 return statements (exceeds 4 allowed).
    Open

    func getAWSCredentials(
        env environment.Environment,
        registry *config.ECRRegistry,
    ) (*awsCredentials, error) {
        accessKeyID, err := env.ExpandString(registry.AccessKeyID)
    Severity: Major
    Found in registry/ecr.go - About 40 mins to fix

      Function translateTask has 6 return statements (exceeds 4 allowed).
      Open

      func translateTask(
          parent *config.Config,
          name string,
          data json.RawMessage,
      ) (config.Task, error) {
      Severity: Major
      Found in loader/jsonconfig/task.go - About 40 mins to fix

        Function copyFile has 6 return statements (exceeds 4 allowed).
        Open

        func copyFile(src, dest string, info os.FileInfo) error {
            srcFile, err := os.Open(src)
            if err != nil {
                return err
            }
        Severity: Major
        Found in paths/copier.go - About 40 mins to fix

          Function EnsureKeysAvailable has 6 return statements (exceeds 4 allowed).
          Open

          func EnsureKeysAvailable(identities []string) (bool, error) {
              if len(identities) == 0 {
                  return false, nil
              }
          
          
          Severity: Major
          Found in ssh/keys.go - About 40 mins to fix

            Method Loader.readOverride has 6 return statements (exceeds 4 allowed).
            Open

            func (l *Loader) readOverride(path string) (*config.Override, error) {
                if override, ok := l.loadedOverrides[path]; ok {
                    return override, nil
                }
            
            
            Severity: Major
            Found in loader/loader.go - About 40 mins to fix

              Method Copier.copy has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  src string,
                  dest string,
                  blacklist map[string]struct{},
                  info os.FileInfo,
                  recursive bool,
              Severity: Minor
              Found in paths/copier.go - About 35 mins to fix

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

                    ctx context.Context,
                    logger logging.Logger,
                    env environment.Environment,
                    registry *config.ServerRegistry,
                    runner command.Runner,
                Severity: Minor
                Found in registry/server.go - About 35 mins to fix

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

                      ctx context.Context,
                      runner command.Runner,
                      server string,
                      username string,
                      password string,
                  Severity: Minor
                  Found in registry/registry.go - About 35 mins to fix

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

                        runID string,
                        containerName string,
                        scratch *scratch.ScratchSpace,
                        containerLists *ContainerLists,
                        logger logging.Logger,
                    Severity: Minor
                    Found in runner/ssh_agent.go - About 35 mins to fix

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

                          verbose bool,
                          colorize bool,
                          clock glock.Clock,
                          outStream io.Writer,
                          errStream io.Writer,
                      Severity: Minor
                      Found in logging/processor.go - About 35 mins to fix

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

                            runID string,
                            identities []string,
                            scratch *scratch.ScratchSpace,
                            containerLists *ContainerLists,
                            logger logging.Logger,
                        Severity: Minor
                        Found in runner/ssh_agent.go - About 35 mins to fix

                          Method Transferer.transferPath has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              rawSrc string,
                              rawDest string,
                              srcRoot string,
                              destRoot string,
                              blacklist map[string]struct{},
                          Severity: Minor
                          Found in paths/transferer.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

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

                                  ctx context.Context,
                                  config *config.Config,
                                  taskRunnerFactory TaskRunnerFactory,
                                  logger logging.Logger,
                                  env []string,
                              Severity: Minor
                              Found in runner/plan.go - About 35 mins to fix

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

                                    ctx context.Context,
                                    logger logging.Logger,
                                    env environment.Environment,
                                    registry *config.ECRRegistry,
                                    runner command.Runner,
                                Severity: Minor
                                Found in registry/ecr.go - About 35 mins to fix

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

                                      ctx context.Context,
                                      logger logging.Logger,
                                      env environment.Environment,
                                      registry *config.GCRRegistry,
                                      runner command.Runner,
                                  Severity: Minor
                                  Found in registry/gcr.go - About 35 mins to fix

                                    Method runner.run has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        ctx context.Context,
                                        args []string,
                                        stdin io.ReadCloser,
                                        outProcessor outputProcessor,
                                        errProcessor outputProcessor,
                                    Severity: Minor
                                    Found in command/runner.go - About 35 mins to fix

                                      Method StageRunner.buildTaskRunnerFunc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          stageTask *config.StageTask,
                                          index int,
                                          task config.Task,
                                          context *RunContext,
                                          ambiguous bool,
                                      Severity: Minor
                                      Found in runner/stage.go - About 35 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language