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 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 \