chores(deps): support depguard rules in golang-lint (#4640)

* update depguard rules golang-lint

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* Update .golangci.yml

Co-authored-by: Hongcai Ren <renhongcai@huawei.com>
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Co-authored-by: Hongcai Ren <renhongcai@huawei.com>
This commit is contained in:
dongjiang 2024-02-20 15:12:07 +08:00 committed by GitHub
parent f935586e7d
commit 9250219d2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -48,8 +48,15 @@ linters:
- misspell
- whitespace
- revive
- depguard
linters-settings:
depguard:
rules:
main:
deny:
- pkg: "io/ioutil"
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
goimports:
local-prefixes: github.com/karmada-io/karmada
gocyclo: