1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

build: replace golint with staticcheck

As it has been deprecated for about ~2 years in favor of `go vet` and
tools like `staticcheck`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
Hidde Beydals
2023-08-14 23:11:19 +02:00
parent ca0e15eda3
commit f85eb011a6

View File

@@ -2,15 +2,17 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
PROJECT := github.com/getsops/sops/v3
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
GO := GOPROXY=https://proxy.golang.org go
GOLINT := golint
PROJECT := github.com/getsops/sops/v3
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
GO := GOPROXY=https://proxy.golang.org go
GITHUB_REPOSITORY ?= github.com/getsops/sops
GITHUB_REPOSITORY ?= github.com/getsops/sops
GORELEASER := $(PROJECT_DIR)/bin/goreleaser
GORELEASER_VERSION ?= v1.20.0
STATICCHECK := $(PROJECT_DIR)/bin/staticcheck
STATICCHECK_VERSION := latest
GORELEASER := $(PROJECT_DIR)/bin/goreleaser
GORELEASER_VERSION ?= v1.20.0
.PHONY: all
all: test vet generate install functional-tests
@@ -24,8 +26,9 @@ install:
tag: all
git tag -s $(TAGVER) -a -m "$(TAGMSG)"
lint:
$(GOLINT) $(PROJECT)
.PHONY: staticcheck
staticcheck: install-staticcheck
$(STATICCHECK) ./...
.PHONY: vendor
vendor:
@@ -66,6 +69,10 @@ functional-tests-all:
release-snapshot: install-goreleaser
GITHUB_REPOSITORY=$(GITHUB_REPOSITORY) $(GORELEASER) release --clean --snapshot --skip-sign
.PHONY: install-staticcheck
install-staticcheck:
$(call go-install-tool,$(STATICCHECK),honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION),$(STATICCHECK_VERSION))
.PHONY: install-goreleaser
install-goreleaser:
$(call go-install-tool,$(GORELEASER),github.com/goreleaser/goreleaser@$(GORELEASER_VERSION),$(GORELEASER_VERSION))