aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-11 13:33:11 +0700
committerShulhan <ms@kilabit.info>2023-11-11 13:34:43 +0700
commit08852664aa6952e727addb0c24ad8f56274e09bb (patch)
treed4f59e9000a2676bf1c5952c0cbeb6a5ff1f7443 /Makefile
parente56ee3e03a34fa738b626a4fd22fbc051bf7f0b0 (diff)
downloadgorankusu-08852664aa6952e727addb0c24ad8f56274e09bb.tar.xz
Makefile: replace the Go linter and apply all their recommendations
Previously, we use golangci-lint as linter. This linter does not provides any useful recommendation lately and the development is quite a mess, sometimes its break when using Go tip. In this changes we replace it with revive, fieldalignment, and shadow; and fix all of their recommendations.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1ee608c..0875d72 100644
--- a/Makefile
+++ b/Makefile
@@ -2,15 +2,23 @@
## SPDX-License-Identifier: GPL-3.0-or-later
.PHONY: all
-all: lint
+all: lint test
go run ./internal/cmd/trunks build
- CGO_ENABLED=1 go test -v -race ./...
- -golangci-lint run ./...
.PHONY: lint
-lint:
+lint: lint-www
+ -revive ./...
+ -fieldalignment ./...
+ -shadow ./...
+
+.PHONY: lint-www
+lint-www:
cd _www && npx eslint --fix .
+.PHONY: test
+test:
+ CGO_ENABLED=1 go test -v -race ./...
+
.PHONY: dev
dev:
go run ./internal/cmd/trunks