From f92bd53fa0e4535ca80da79c05345c2408419dc1 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 8 Sep 2024 14:04:52 +0700 Subject: linter: replace golangci-lint with fieldalignment, shadow, and "go vet" While at it, make the lint task run before test. --- Makefile | 15 +++++++++------ 1 file 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 -- cgit v1.3