aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-09-08 14:04:52 +0700
committerShulhan <ms@kilabit.info>2024-09-08 14:04:52 +0700
commitf92bd53fa0e4535ca80da79c05345c2408419dc1 (patch)
tree4c78794dbee133d07c639d9656518304c7fe23d3 /Makefile
parent9cdbccc13eb68e6d2c0067a009416f0e766dccc8 (diff)
downloadkbbi-f92bd53fa0e4535ca80da79c05345c2408419dc1.tar.xz
linter: replace golangci-lint with fieldalignment, shadow, and "go vet"
While at it, make the lint task run before test.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index c033f6f..2f9e3b0 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,15 @@
## SPDX-License-Identifier: GPL-3.0-or-later
.PHONY: all
-all: test lint install
+all: lint test install
+
+
+.PHONY: lint
+lint:
+ -fieldalignment ./...
+ -shadow ./...
+ -go vet ./...
+ -reuse lint
COVER_TXT:=cover.txt
@@ -15,11 +23,6 @@ test:
go tool cover -html=$(COVER_TXT) -o $(COVER_HTML)
-.PHONY: lint
-lint:
- -golangci-lint run ./...
- -reuse lint --quiet
-
.PHONY: install
install:
go install ./cmd/kbbi