Skip to content

Commit

Permalink
ci: add depguard
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Jun 19, 2024
1 parent 417212e commit 28463fb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
linters-settings:
depguard:
rules:
main:
list-mode: lax
deny:
- pkg: "io/ioutil"
desc: "Replaced by 'io' and 'os' packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
# Cannot use gomodguard, which examines go.mod, as "golang.org/x/exp/slices" is not a module and doesn't appear in go.mod.
- pkg: "golang.org/x/exp/slices"
desc: "Use 'slices' instead"
- pkg: "golang.org/x/exp/maps"
desc: "Use 'maps' instead"
dupl:
threshold: 100
errcheck:
Expand Down Expand Up @@ -81,6 +93,7 @@ linters:
disable-all: true
enable:
- bodyclose
- depguard
- gci
- goconst
- gocritic
Expand Down

0 comments on commit 28463fb

Please sign in to comment.