From a783cc45743250441b33a73bf263dc2826b16aef Mon Sep 17 00:00:00 2001 From: Abhinav Nair <11939846+abhinavnair@users.noreply.github.com> Date: Tue, 28 Jun 2022 09:18:40 +0800 Subject: [PATCH] Blacklist ioutil pkg in golangci-lint This is to prevent anyone from accidentally importing the pkg Signed-off-by: Abhinav Nair <11939846+abhinavnair@users.noreply.github.com> --- .golangci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 48ca9cf91..d31ae43b2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,6 +7,7 @@ linters: disable-all: true enable: - deadcode + - depguard - errcheck - gocyclo - gofmt @@ -26,6 +27,13 @@ linters: - unused - varcheck linters-settings: + 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 gocyclo: min-complexity: 16 lll: