File: stop-using-golint.patch

package info (click to toggle)
golang-github-lorenzosaino-go-sysctl 0.3.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 184 kB
  • sloc: makefile: 44
file content (41 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: =?utf-8?b?T3R0byBLZWvDpGzDpGluZW4=?= <otto@debian.org>
Date: Fri, 22 Aug 2025 08:00:00 +0000
Subject: Stop using `golint` so golang.org/x/lint can be removed

The `golint` tool is deprecated and no longer actively maintained by the Go
community. Remove the `lint` target from the `Makefile` and its inclusion in the
`all` target so `golint` is no longer used at all.

Removing `golint` simplifies the build process, reduces the project's dependency
footprint, and aligns the project with current Go best practices. The vendored
`golang.org/x/lint` directory can be safely removed with this change.

---
 Makefile | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 2f3e00f..813ca14 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ DOCKER_RUN_FLAGS = --rm -it -v $$(pwd):/go/src/$(PKG) -w /go/src/$(PKG)
 
 export GO111MODULE=on
 
-all: fmt-check lint vet nilness staticcheck test ## Run all checks and tests
+all: fmt-check vet nilness staticcheck test ## Run all checks and tests
 
 .PHONY: mod-upgrade
 mod-upgrade: ## Upgrade all vendored dependencies
@@ -28,11 +28,6 @@ mod-update: ## Ensure all used dependencies are tracked in go.{mod|sum} and vend
 fmt-check: ## Validate that all source files pass "go fmt"
 	exit $(shell $(GO) fmt ./... | wc -l)
 
-.PHONY: lint
-lint: ## Run go lint
-	@[ -x "$(shell which golint)" ] || $(GO) install ./vendor/golang.org/x/lint/golint 2>/dev/null || $(GO) install golang.org/x/lint/golint@latest
-	@# We need to explicitly exclude ./vendor because of https://github.com/golang/lint/issues/320
-	golint -set_exit_status $(shell $(GO)  list ./... | grep -v '/vendor/')
 
 .PHONY: vet
 vet: ## Run go vet