mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Makefile: Check for any non committed auto-generated code (#10579)
Always check if the auto-generated code is still compatible with the existing written code to avoid a possible forgetting or sometimes a non intentional change.
This commit is contained in:
8
Makefile
8
Makefile
@@ -18,11 +18,17 @@ getdeps:
|
||||
@mkdir -p ${GOPATH}/bin
|
||||
@which golangci-lint 1>/dev/null || (echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.27.0)
|
||||
@which ruleguard 1>/dev/null || (echo "Installing ruleguard" && GO111MODULE=off go get github.com/quasilyte/go-ruleguard/...)
|
||||
@which msgp 1>/dev/null || (echo "Installing msgp" && go get github.com/tinylib/msgp)
|
||||
@which stringer 1>/dev/null || (echo "Installing stringer" && go get golang.org/x/tools/cmd/stringer)
|
||||
|
||||
crosscompile:
|
||||
@(env bash $(PWD)/buildscripts/cross-compile.sh)
|
||||
|
||||
verifiers: getdeps fmt lint ruleguard
|
||||
verifiers: getdeps fmt lint ruleguard check-gen
|
||||
|
||||
check-gen:
|
||||
@go generate ./... >/dev/null
|
||||
@git diff --exit-code >/dev/null || echo "Non-committed changes in auto-generated code are detected, please check."
|
||||
|
||||
fmt:
|
||||
@echo "Running $@ check"
|
||||
|
||||
Reference in New Issue
Block a user