aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-01-31 17:37:07 +0700
committerShulhan <ms@kilabit.info>2023-01-31 17:37:07 +0700
commit6a62797b1aa9b313c4c9fd0d41a00c83064c5bdf (patch)
treefbde65bc0b6a5b17f9eacf03bd62fa66d4077946
parente59291fc07605b35e07174803a12b45365cd8fe8 (diff)
downloadduitku-6a62797b1aa9b313c4c9fd0d41a00c83064c5bdf.tar.xz
make: split the lint task and add golangci-lint as one of the linter
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4869220..edbed29 100644
--- a/Makefile
+++ b/Makefile
@@ -6,10 +6,13 @@ COVER_HTML=cover.html
.PHONY: all test
-all: test
+all: test lint
test:
CGO_ENABLED=1 go test -race -coverprofile=$(COVER_OUT) ./...
go tool cover -html=$(COVER_OUT) -o $(COVER_HTML)
go tool cover -func=$(COVER_OUT) | tail -n1
+
+lint:
+ golangci-lint run ./...
fieldalignment ./...