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

Dockerfile: update mvdan/gofumpt to v0.6.0 #4946

Merged
merged 1 commit into from Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -52,7 +52,7 @@ shellcheck: ## run shellcheck validation
.PHONY: fmt
fmt: ## run gofumpt (if present) or gofmt
@if command -v gofumpt > /dev/null; then \
gofumpt -w -d -lang=1.19 . ; \
gofumpt -w -d -lang=1.21 . ; \
else \
go list -f {{.Dir}} ./... | xargs gofmt -w -s -d ; \
fi
Expand Down
1 change: 0 additions & 1 deletion cli/command/image/build/context_test.go
Expand Up @@ -129,7 +129,6 @@ func TestGetContextFromReaderString(t *testing.T) {
tarReader := tar.NewReader(tarArchive)

_, err = tarReader.Next()

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Accidental line removal?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, looks like gofumpt tightened up formatting a bit for these so that there's no empty line between where the error is produced and where it's checked.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it's this commit; mvdan/gofumpt@025a91f

previously it would already do this for the err := ... case, but now also for err = ... (pre-existing err variable) case.

if err != nil {
t.Fatalf("Error when reading tar archive: %s", err)
}
Expand Down
1 change: 0 additions & 1 deletion cli/command/plugin/create.go
Expand Up @@ -114,7 +114,6 @@ func runCreate(ctx context.Context, dockerCli command.Cli, options pluginCreateO
createCtx, err = archive.TarWithOptions(absContextDir, &archive.TarOptions{
Compression: compression,
})

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Accidental line removal?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same for this one 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, good to know! 😄

if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.dev
Expand Up @@ -11,7 +11,7 @@ ENV GOTOOLCHAIN=local
ENV CGO_ENABLED=0

FROM golang AS gofumpt
ARG GOFUMPT_VERSION=v0.4.0
ARG GOFUMPT_VERSION=v0.6.0
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=tmpfs,target=/go/src/ \
Expand Down