pkg/build/image/build_context_archive.go

Summary

Maintainability
A
1 hr
Test Coverage
F
31%

Method BuildContextArchive.CalculateGlobsChecksum has 6 return statements (exceeds 4 allowed).
Open

func (a *BuildContextArchive) CalculateGlobsChecksum(ctx context.Context, globs []string, checkForArchives bool) (string, error) {
    contextDir, err := a.ExtractOrGetExtractedDir(ctx)
    if err != nil {
        return "", fmt.Errorf("unable to get build context dir: %w", err)
    }
Severity: Major
Found in pkg/build/image/build_context_archive.go - About 40 mins to fix

    Method BuildContextArchive.ExtractOrGetExtractedDir has 6 return statements (exceeds 4 allowed).
    Open

    func (a *BuildContextArchive) ExtractOrGetExtractedDir(ctx context.Context) (string, error) {
        if a.path == "" {
            panic("extract should not be called before create")
        }
    
    
    Severity: Major
    Found in pkg/build/image/build_context_archive.go - About 40 mins to fix

      Method BuildContextArchive.Create has 5 return statements (exceeds 4 allowed).
      Open

      func (a *BuildContextArchive) Create(ctx context.Context, opts container_backend.BuildContextArchiveCreateOptions) error {
          contextPathRelativeToGitWorkTree := filepath.Join(a.giterminismMgr.RelativeToGitProjectDir(), opts.ContextGitSubDir)
      
          dockerIgnorePathMatcher, err := createDockerIgnorePathMatcher(ctx, a.giterminismMgr, opts.ContextGitSubDir, opts.DockerfileRelToContextPath)
          if err != nil {
      Severity: Major
      Found in pkg/build/image/build_context_archive.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status