From 866ccb0581c9b078d2b49ae40bea69c21e81eed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Sun, 16 Aug 2026 21:21:31 +0200 Subject: [PATCH 1/2] Add `.gitattributes` to force LF for `*.go` files This is required for tools like `gofmt` to process the files on all platforms the same. Otherwise it marks every file with CRLFs as unformatted. --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..2258534c27 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Go tools like `gofmt` require LF as line endings +*.go text eol=lf From 6e6324710c72962231458713a9af3093409b64b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Sun, 16 Aug 2026 10:52:10 +0200 Subject: [PATCH 2/2] test: Check `gofmt` results We like to have gofmt-ed files present in PRs before a review is done. To reach this we let the PR test fail in the moment the files are not properly formatted. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 083ea1e922..2447014f6d 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,7 @@ testgen: test: go test ./internal/... go test ./cmd/... + @test -z "$$(gofmt -l .)" || { echo "gofmt issues:"; gofmt -d -e .; exit 1; } bench: for i in 1 2 3; do \