Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: set proper cache key for golangci-lint target #4490

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

crazy-max
Copy link
Member

reported by @jsternberg

 > [lint-nydus golangci-lint 1/1] RUN --mount=target=/go/src/github.com/moby/buildkit     --mount=target=/root/.cache,type=cache,id=lint-cache-linux/arm64   xx-go --wrap &&   golangci-lint run --build-tags "nydus" &&   touch /golangci-lint.done:
61.01 cmd/buildkitd/main.go:17:46: directive `//nolint:staticcheck // SA1019 deprecated` is unused for linter "staticcheck" (nolintlint)
61.01   "github.com/containerd/containerd/pkg/seed" //nolint:staticcheck // SA1019 deprecated
61.01                                               ^
61.01 cmd/buildkitd/main.go:80:2: directive `//nolint:staticcheck // SA1019 deprecated` is unused for linter "staticcheck" (nolintlint)
61.01   //nolint:staticcheck // SA1019 deprecated
61.01   ^

Cache is shared across targets (default, labs, nydus) but should have its own key.

Copy link
Member

@jedevc jedevc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, I've also seen that weird linting error but never been able to catch why it was happening 🎉

@crazy-max crazy-max merged commit a711a6d into moby:master Dec 15, 2023
60 checks passed
@crazy-max crazy-max deleted the fix-lint-cache branch December 15, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants