Skip to content

Commit

Permalink
add format target
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin committed Jun 17, 2024
1 parent a853fd7 commit f9be6b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ all: build
build:
go build -o build/k6build ./cmd/k6build

.PHONY: format
format:
gofmt -w -s .
gofumpt -w .

# Running with -buildvcs=false works around the issue of `go list all` failing when git, which runs as root inside
# the container, refuses to operate on the disruptor source tree as it is not owned by the same user (root).
.PHONY: lint
lint:
lint: format
docker run --rm -v $(work_dir):/src -w /src -e GOFLAGS=-buildvcs=false golangci/golangci-lint:$(golangci_version) golangci-lint run

.PHONY: test
Expand Down

0 comments on commit f9be6b2

Please sign in to comment.