Skip to content

Commit 82db2f8

Browse files
authored
make: add go-mod-tidy target and update lint dependencies (#147)
- Add new go-mod-tidy target to ensure consistent module dependencies - Update lint target to depend on go-mod-tidy, enforcing clean dependencies before linting Signed-off-by: Flc <four_leaf_clover@foxmail.com>
1 parent fafaa34 commit 82db2f8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ init:
33
go install mvdan.cc/gofumpt@latest
44
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
55

6+
.PHONY: go-mod-tidy
7+
go-mod-tidy:
8+
go mod tidy -compat=1.23.0
9+
@echo "✅ Go modules tidied"
10+
611
.PHONY: lint
7-
lint:
12+
lint: go-mod-tidy
813
golangci-lint run
914
@echo "✅ Linting completed"
1015

0 commit comments

Comments
 (0)