6e704239a6
Signed-off-by: knqyf263 <knqyf263@gmail.com> Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
24 lines
497 B
Makefile
24 lines
497 B
Makefile
export SHELL := /bin/bash
|
|
export SHELLOPTS := errexit
|
|
|
|
GOPATH ?= $(shell go env GOPATH)
|
|
BIN_DIR := $(GOPATH)/bin
|
|
GOLANGCI_LINT := $(BIN_DIR)/golangci-lint
|
|
|
|
.PHONY: lint lintfix test build
|
|
|
|
$(GOLANGCI_LINT):
|
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BIN_DIR) v1.54.2
|
|
|
|
lint: $(GOLANGCI_LINT)
|
|
@$(GOLANGCI_LINT) run
|
|
|
|
lintfix: $(GOLANGCI_LINT)
|
|
@$(GOLANGCI_LINT) run --fix
|
|
|
|
test:
|
|
go test -race ./...
|
|
|
|
build:
|
|
go build -o vuln-list-update .
|