jkawamoto/loci

View on GitHub
command/docker.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function Start has 7 return statements (exceeds 4 allowed).
Open

func Start(ctx context.Context, tag, name string, env []string, output io.Writer) (err error) {

    // Create a docker client.
    cli, err := client.NewEnvClient()
    if err != nil {
Severity: Major
Found in command/docker.go - About 45 mins to fix

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

    func Dockerfile(travis *Travis, opt *DockerfileOpt, archive string) (res []byte, err error) {
    
        var data []byte
    
        // Loading the base template.
    Severity: Major
    Found in command/docker.go - About 40 mins to fix

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

      func archiveContext(ctx context.Context, root string, writer io.Writer) (err error) {
      
          // Create a buffered writer.
          bufWriter := bufio.NewWriter(writer)
          defer bufWriter.Flush()
      Severity: Major
      Found in command/docker.go - About 40 mins to fix

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

        func Build(ctx context.Context, dir, tag, version string, noCache bool, output io.Writer) (err error) {
        
            // Create a docker client.
            cli, err := client.NewEnvClient()
            if err != nil {
        Severity: Major
        Found in command/docker.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status