Showing 53 of 348 total issues

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

    Method runTaskCommandBuilderState.addScriptOptions has 5 return statements (exceeds 4 allowed).
    Open

    func (s *runTaskCommandBuilderState) addScriptOptions(cb *command.Builder) error {
        if s.task.Script == "" {
            return nil
        }
    
    
    Severity: Major
    Found in runner/run_task.go - About 35 mins to fix

      Function validateConfig has 5 return statements (exceeds 4 allowed).
      Open

      func validateConfig(path string, data []byte) error {
          if err := schema.Validate("schema/config.yaml", data); err != nil {
              return fmt.Errorf("failed to validate config %s: %s", path, err.Error())
          }
      
      
      Severity: Major
      Found in loader/loader.go - About 35 mins to fix

        Function runMain has 5 return statements (exceeds 4 allowed).
        Open

        func runMain() error {
            app := kingpin.New("ij", "IJ is a build tool using Docker containers.").Version(consts.Version)
            clean := app.Command("clean", "Remove exported files.")
            _ = app.Command("login", "Login to docker registries.")
            _ = app.Command("logout", "Logout of docker registries.")
        Severity: Major
        Found in main.go - About 35 mins to fix

          Method ScratchSpace.MakeLogFiles has 5 return statements (exceeds 4 allowed).
          Open

          func (s *ScratchSpace) MakeLogFiles(prefix string) (*os.File, *os.File, error) {
              outpath, err := buildPath(filepath.Join(s.runpath, LogsDir, prefix+OutLogSuffix))
              if err != nil {
                  return nil, nil, err
              }
          Severity: Major
          Found in scratch/scratch.go - About 35 mins to fix

            Method runTaskCommandBuilderState.addCommandOptions has 5 return statements (exceeds 4 allowed).
            Open

            func (s *runTaskCommandBuilderState) addCommandOptions(cb *command.Builder) error {
                if s.task.Script != "" {
                    return nil
                }
            
            
            Severity: Major
            Found in runner/run_task.go - About 35 mins to fix

              Function getGCRPassword has 5 return statements (exceeds 4 allowed).
              Open

              func getGCRPassword(
                  env environment.Environment,
                  registry *config.GCRRegistry,
              ) (string, error) {
                  key, err := env.ExpandString(registry.Key)
              Severity: Major
              Found in registry/gcr.go - About 35 mins to fix

                Method Loader.Load has 5 return statements (exceeds 4 allowed).
                Open

                func (l *Loader) Load(path string) (*config.Config, error) {
                    path = l.normalizePath(path, "")
                
                    if err := l.readConfigs(path); err != nil {
                        return nil, err
                Severity: Major
                Found in loader/loader.go - About 35 mins to fix

                  Method runTaskRunner.exportEnvironmentFile has 5 return statements (exceeds 4 allowed).
                  Open

                  func (r *runTaskRunner) exportEnvironmentFile(context *RunContext, path string) bool {
                      workspace := r.scratch.Workspace()
                  
                      realPath, err := filepath.Abs(filepath.Join(workspace, path))
                      if err != nil {
                  Severity: Major
                  Found in runner/run_task.go - About 35 mins to fix

                    Function translateRegistry has 5 return statements (exceeds 4 allowed).
                    Open

                    func translateRegistry(data json.RawMessage) (config.Registry, error) {
                        typeHint := &RegistryTypeHint{Type: "server"}
                    
                        if err := json.Unmarshal(data, typeHint); err != nil {
                            return nil, err
                    Severity: Major
                    Found in loader/jsonconfig/registry.go - About 35 mins to fix

                      Method runTaskRunner.Run has 5 return statements (exceeds 4 allowed).
                      Open

                      func (r *runTaskRunner) Run(context *RunContext) bool {
                          r.logger.Info(
                              r.prefix,
                              "Beginning task",
                          )
                      Severity: Major
                      Found in runner/run_task.go - About 35 mins to fix

                        Method Loader.readConfigs has 5 return statements (exceeds 4 allowed).
                        Open

                        func (l *Loader) readConfigs(path string) error {
                            if _, ok := l.loadedConfigs[path]; ok {
                                return nil
                            }
                        
                        
                        Severity: Major
                        Found in loader/loader.go - About 35 mins to fix

                          Function Validate has 5 return statements (exceeds 4 allowed).
                          Open

                          func Validate(name string, data []byte) error {
                              schema, err := getSchema(name)
                              if err != nil {
                                  return err
                              }
                          Severity: Major
                          Found in loader/schema/schema.go - About 35 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language