From 9b1178849c99f25a25bda2789c618d6f5ca6ba0c Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 9 Sep 2023 14:55:52 -0700 Subject: [PATCH] Stop using golang.org/x/lint golint is not supported anymore. See https://github.com/golang/go/issues/38968. We already use both 'go vet' and 'staticheck' which are maintained. --- .gitignore | 1 - CONTRIBUTING.md | 1 - Makefile | 7 ++----- go.mod | 1 - go.sum | 7 ------- tools.go | 1 - 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index ca3e70ea..0d8b56fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ bin/fscrypt bin/pam_fscrypt.so bin/protoc -bin/golint bin/protoc-gen-go bin/goimports bin/staticcheck diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df57d8b1..a5474276 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -160,5 +160,4 @@ your code. `make lint` runs: - [`go vet`](https://golang.org/cmd/vet/) - - [`golint`](https://github.com/golang/lint) - [`staticcheck`](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) diff --git a/Makefile b/Makefile index 0ffd1eb3..aee85532 100644 --- a/Makefile +++ b/Makefile @@ -105,9 +105,8 @@ format: $(BIN)/goimports goimports -w $(GO_NONGEN_FILES) clang-format -i -style=Google $(C_FILES) -lint: $(BIN)/golint $(BIN)/staticcheck $(BIN)/misspell +lint: $(BIN)/staticcheck $(BIN)/misspell go vet ./... - go list ./... | xargs -L1 golint -set_exit_status staticcheck ./... misspell -source=text $(FILES) shellcheck -s bash cmd/fscrypt/fscrypt_bash_completion @@ -197,12 +196,10 @@ ifdef PAM_CONFIG_DIR endif #### Tool Building Commands #### -TOOLS := $(addprefix $(BIN)/,protoc golint protoc-gen-go goimports staticcheck gocovmerge misspell) +TOOLS := $(addprefix $(BIN)/,protoc protoc-gen-go goimports staticcheck gocovmerge misspell) .PHONY: tools tools: $(TOOLS) -$(BIN)/golint: - go build -o $@ golang.org/x/lint/golint $(BIN)/protoc-gen-go: go build -o $@ google.golang.org/protobuf/cmd/protoc-gen-go $(BIN)/goimports: diff --git a/go.mod b/go.mod index 8087d793..f9bca315 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/urfave/cli v1.22.5 github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a diff --git a/go.sum b/go.sum index 659478e9..84dc34a3 100644 --- a/go.sum +++ b/go.sum @@ -22,18 +22,13 @@ github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad h1:W0LEBv82YCGEtc github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad/go.mod h1:Hy8o65+MXnS6EwGElrSRjUzQDLXreJlzYLlWiHtt8hM= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220408190544-5352b0902921 h1:iU7T1X1J6yxDr0rda54sWGkHgOp5XJrqm79gcNlC2VM= golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e h1:qyrTQ++p1afMkO4DPEeLGq/3oTsdlvdH4vqZUBWzUKM= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -41,7 +36,6 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -57,7 +51,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a h1:ofrrl6c6NG5/IOSx/R1cyiQxxjqlur0h/TvbUhkH0II= golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/tools.go b/tools.go index e84439f3..7a5072b9 100644 --- a/tools.go +++ b/tools.go @@ -8,7 +8,6 @@ package tools import ( _ "github.com/client9/misspell/cmd/misspell" _ "github.com/wadey/gocovmerge" - _ "golang.org/x/lint/golint" _ "golang.org/x/tools/cmd/goimports" _ "google.golang.org/protobuf/cmd/protoc-gen-go" _ "honnef.co/go/tools/cmd/staticcheck"