Skip to content

Commit

Permalink
make: Add target to verify generated files are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
mmlb committed May 10, 2024
1 parent 943fae5 commit 902d26d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ export GOBIN=$(CURDIR)/bin
export PATH:=$(PATH):$(GOBIN)

## Run all linters
lint: golangci-lint
lint: golangci-lint check-go-generated

## Run golangci-lint
golangci-lint:
go install github.com/golangci/golangci-lint/cmd/[email protected]
golangci-lint run --config .golangci.yml

## Run go generate
generate:
go install golang.org/x/tools/cmd/[email protected]
go generate ./...

## Check generated files are up to date
check-go-generated: generate
git diff | (! grep .)

## Run go test
go-test:
CGO_ENABLED=0 go test -v -covermode=atomic ./...
Expand Down

0 comments on commit 902d26d

Please sign in to comment.