Skip to content

Commit e9cc07d

Browse files
kyu08stefanhaller
authored andcommitted
Pass only Git-tracked Go files to gofumpt
1 parent b1382da commit e9cc07d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ test: unit-test integration-test-all
3434
generate:
3535
go generate ./...
3636

37+
# If you execute `gofumpt -l -w .`, it will format all Go files in the current directory, including `test/_results/*` files.
38+
# We pass only Git-tracked Go files to gofumpt because we don't want to format the test results or get errors from it.
3739
.PHONY: format
3840
format:
39-
gofumpt -l -w .
41+
git ls-files '*.go' ':!vendor' | xargs gofumpt -l -w
4042

4143
.PHONY: lint
4244
lint:

0 commit comments

Comments
 (0)