dotcloud/docker

View on GitHub
builder/remotecontext/git/gitutils.go

Summary

Maintainability
A
1 hr
Test Coverage

Method gitRepo.clone has 7 return statements (exceeds 4 allowed).
Open

func (repo gitRepo) clone() (checkoutDir string, err error) {
    fetch := fetchArgs(repo.remote, repo.ref)

    root, err := os.MkdirTemp("", "docker-build-git")
    if err != nil {
Severity: Major
Found in builder/remotecontext/git/gitutils.go - About 45 mins to fix

    Method gitRepo.checkout has 5 return statements (exceeds 4 allowed).
    Open

    func (repo gitRepo) checkout(root string) (string, error) {
        // Try checking out by ref name first. This will work on branches and sets
        // .git/HEAD to the current branch name
        if output, err := repo.gitWithinDir(root, "checkout", repo.ref); err != nil {
            // If checking out by branch name fails check out the last fetched ref
    Severity: Major
    Found in builder/remotecontext/git/gitutils.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status