From 9a0b1f4f6bfa76aee06cc81c12f430dbf08c419f Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Thu, 23 Dec 2021 08:57:27 -0800 Subject: [PATCH] hack: use golangci-lint to find io/ioutil The package has been deprecated since Go 1.16. Signed-off-by: Kazuyoshi Kato --- hack/validate/golangci-lint.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/validate/golangci-lint.yml b/hack/validate/golangci-lint.yml index c2081ed83f..3aedf82a0c 100644 --- a/hack/validate/golangci-lint.yml +++ b/hack/validate/golangci-lint.yml @@ -1,6 +1,7 @@ linters: enable: - deadcode + - depguard - goimports - golint - gosec @@ -31,7 +32,13 @@ linters: linters-settings: govet: check-shadowing: false - + depguard: + list-type: blacklist + include-go-root: true + packages: + # The io/ioutil package has been deprecated. + # https://go.dev/doc/go1.16#ioutil + - io/ioutil issues: # The default exclusion rules are a bit too permissive, so copying the relevant ones below exclude-use-default: false