mirror of
https://github.com/docker/compose.git
synced 2026-11-18 22:27:03 +00:00
build(lint): bump golangci-lint to v2.15.0 and fix what it now reports
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
The release updates errcheck (1.20 to 1.30) and gocognit (1.2.1 to 1.3.0). errcheck now reports the receives from an error channel whose value is dropped on purpose, in three places: waiting for the attach copy to end after the context is done, draining the container wait channel of a failed hook, and waiting for Up to return in a test. Say why on each, rather than handling an error nobody can act on. gocognit's new count is handled by the previous commit. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
70ec1e62f6
commit
343bb382d2
4 changed files with 4 additions and 4 deletions
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ARG GO_VERSION=1.26.10
|
||||
ARG XX_VERSION=1.9.0
|
||||
ARG GOLANGCI_LINT_VERSION=v2.13.2
|
||||
ARG GOLANGCI_LINT_VERSION=v2.15.0
|
||||
ARG ADDLICENSE_VERSION=v1.0.0
|
||||
# Keep in sync with GOTESTSUM_VERSION in the Makefile
|
||||
ARG GOTESTSUM_VERSION=v1.13.0
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ func (s *composeService) runHook(ctx context.Context, ctr container.Summary, ser
|
|||
// Close the connection to unblock the blocked Read in the copy goroutine,
|
||||
// then wait for it to exit before returning so there is no goroutine leak.
|
||||
attach.Close()
|
||||
<-copyDone
|
||||
<-copyDone //nolint:errcheck // the copy error is irrelevant: the context error is returned
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ func (s *composeService) execPreStartHook(
|
|||
// Drain waitRes so the client's wait goroutine exits without having to
|
||||
// wait for the parent context to be canceled.
|
||||
select {
|
||||
case <-waitRes.Error:
|
||||
case <-waitRes.Error: //nolint:errcheck // only draining: the error that matters is the one being returned
|
||||
case <-waitRes.Result:
|
||||
case <-ctx.Done():
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ func (h *interactiveUpHarness) upWith(t *testing.T, ctx context.Context, cancel
|
|||
case <-time.After(10 * time.Second):
|
||||
cancel()
|
||||
select {
|
||||
case <-done:
|
||||
case <-done: //nolint:errcheck // only waiting for up to return, the test fails right below
|
||||
case <-time.After(5 * time.Second):
|
||||
}
|
||||
t.Fatalf("up did not return; calls so far: %v", h.daemon.recorded())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue