1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

chore: add lint and all targets to Makefile (#1298)

This commit is contained in:
chavacava
2025-04-07 11:24:19 +02:00
committed by GitHub
parent c882cb8f4f
commit 5f32e8bffa

View File

@@ -1,4 +1,4 @@
.PHONY: test
.PHONY: test lint
export GO111MODULE=on
@@ -8,12 +8,17 @@ DATE ?= $(shell date -u '+%Y-%m-%d %H:%M UTC')
BUILDER ?= Makefile
VERSION_FLAGS := -X "github.com/mgechev/revive/cli.version=$(GIT_VERSION)" -X "github.com/mgechev/revive/cli.date=$(DATE)" -X "github.com/mgechev/revive/cli.commit=$(GIT_COMMIT)" -X "github.com/mgechev/revive/cli.builtBy=$(BUILDER)"
all: test lint build
install:
@go mod vendor
build:
@go build -ldflags='$(VERSION_FLAGS)'
lint:
revive --config revive.toml ./...
test:
@go test -v -race ./...