Enable linting for Windows#4261
Conversation
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
These functions are unused on windows and so cause linting issues. Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
62eee9d to
beaa3ca
Compare
| GOARCH=amd64 golangci-lint run --build-tags "${BUILDTAGS}" && \ | ||
| GOARCH=arm64 golangci-lint run --build-tags "${BUILDTAGS}" && \ | ||
| GOOS=linux GOARCH=amd64 golangci-lint run --build-tags "${BUILDTAGS}" && \ | ||
| GOOS=windows GOARCH=amd64 golangci-lint run --build-tags "${BUILDTAGS}" && \ | ||
| GOOS=linux GOARCH=arm64 golangci-lint run --build-tags "${BUILDTAGS}" && \ |
There was a problem hiding this comment.
Should we do freebsd/amd64 too?
There was a problem hiding this comment.
Hmm. The lint run took 20 minutes. Is that just because it's establishing a cache for the new architectures, or would it be worthwhile to split the lint into multiple jobs?
There was a problem hiding this comment.
Yeah, we've essentially doubled the amount of linting we do now - it already takes around 10min on master (also what why is it so slow?).
Splitting SGTM, I'm a bit pressed for time atm, so might not get to it super soon.
Signed-off-by: Justin Chadwell <me@jedevc.com>
| RUN --mount=target=/go/src/github.com/moby/buildkit --mount=target=/root/.cache,type=cache,sharing=locked \ | ||
| GOARCH=amd64 golangci-lint run --build-tags "${BUILDTAGS}" && \ | ||
| GOARCH=arm64 golangci-lint run --build-tags "${BUILDTAGS}" && \ | ||
| GOOS=linux GOARCH=amd64 golangci-lint run --build-tags "${BUILDTAGS}" && \ |
There was a problem hiding this comment.
follow-up: maybe we need some configuration options now to enable both full matrix and current architecture. In CI we should run all but in dev I don't really want to wait 4x longer. Maybe some parallelization pattern as well instead of &&
See #4228 (comment).
This PR enables linting for Windows, and also tidies up the issues from this 😱 (
fmt.Errorfagain, yay!)Opened as draft until containerd/nydus-snapshotter#537 merges upstream and we can update.