diff --git a/core/directory.go b/core/directory.go index 2e83960a65..2003eabd40 100644 --- a/core/directory.go +++ b/core/directory.go @@ -135,7 +135,7 @@ func (dir *Directory) SetState(ctx context.Context, st llb.State) error { buildkit.WithPassthrough(), // these spans aren't particularly interesting ) if err != nil { - return nil + return err } dir.LLB = def.ToPB() diff --git a/core/modulesource.go b/core/modulesource.go index a5d0ead971..b774059ee0 100644 --- a/core/modulesource.go +++ b/core/modulesource.go @@ -572,7 +572,7 @@ func (src *ModuleSource) ModuleConfig(ctx context.Context) (*modules.ModuleConfi configFile, err := contextDir.Self.File(ctx, filepath.Join(rootSubpath, modules.Filename)) if err != nil { // no configuration for this module yet, so no name - return nil, false, nil + return nil, false, nil //nolint:nilerr } configBytes, err := configFile.Contents(ctx) if err != nil { diff --git a/engine/sources/httpdns/source.go b/engine/sources/httpdns/source.go index 4d890f703b..9e876a8f75 100644 --- a/engine/sources/httpdns/source.go +++ b/engine/sources/httpdns/source.go @@ -162,7 +162,7 @@ func (hs *httpSourceHandler) CacheKey(ctx context.Context, g session.Group, inde uh, err := hs.urlHash() if err != nil { - return "", "", nil, false, nil + return "", "", nil, false, err } // look up metadata(previously stored headers) for that URL diff --git a/modules/golangci/lint-config.yml b/modules/golangci/lint-config.yml index ea6f772b30..02ef61aca8 100644 --- a/modules/golangci/lint-config.yml +++ b/modules/golangci/lint-config.yml @@ -27,6 +27,7 @@ linters: - unparam - whitespace - gomodguard + - nilerr issues: exclude-rules: