mirror of
https://github.com/outbackdingo/estserver.git
synced 2026-01-28 18:18:54 +00:00
Fixup: fix make check to work and add make lint
The linter local variable was not initialized. Also, put the linter version into sync with what the GitHub action uses. Signed-off-by: Volodymyr Khoroz <volodymyr.khoroz@foundries.io>
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,9 +1,13 @@
|
||||
linter:=$(shell which golangci-lint 2>/dev/null || echo $(HOME)/go/bin/golangci-lint)
|
||||
|
||||
format:
|
||||
@gofmt -l -w ./
|
||||
|
||||
check: test
|
||||
check: test lint
|
||||
|
||||
lint:
|
||||
@test -z $(shell gofmt -l ./ | tee /dev/stderr) || (echo "[WARN] Fix formatting issues with 'make format'"; exit 1)
|
||||
@test -x $(linter) || (echo "Please install linter from https://github.com/golangci/golangci-lint/releases/tag/v1.25.1 to $(HOME)/go/bin")
|
||||
@test -x $(linter) || (echo "Please install linter from https://github.com/golangci/golangci-lint/releases/tag/v1.49.0 to $(HOME)/go/bin")
|
||||
$(linter) run
|
||||
|
||||
test:
|
||||
@@ -11,4 +15,4 @@ test:
|
||||
|
||||
.PHONY: bin/estserver
|
||||
bin/estserver:
|
||||
go build -o bin/estserver cmd/main.go
|
||||
go build -o bin/estserver cmd/main.go
|
||||
|
||||
Reference in New Issue
Block a user