Skip to content

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

Merged
crazy-max merged 1 commit intomoby:masterfrom
crazy-max:fix-lint-cache
Dec 15, 2023
Merged

lint: set proper cache key for golangci-lint target#4490
crazy-max merged 1 commit intomoby:masterfrom
crazy-max:fix-lint-cache

Conversation

@crazy-max
Copy link
Copy Markdown
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.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Copy link
Copy Markdown
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
@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