Skip to content

Commit c86be81

Browse files
wolfogrejolheiser
andauthored
Add more packages to denylist (#22412)
After this, we can remove [`denylist_imports`](https://gitea.com/gitea/gitea-vet/src/branch/master/checks/denylisted-imports.go#L13) in gitea-vet ([gitea-vet/pulls/23](https://gitea.com/gitea/gitea-vet/pulls/23)). ```go deniedImports = []string{"io/ioutil", "encoding/json", "gitea.com/gitea/go-crypto"} ``` However, we needn't keep `gitea.com/gitea/go-crypto` any longer, it's gone and can't be imported again. Co-authored-by: John Olheiser <[email protected]>
1 parent 9ffaf19 commit c86be81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ linters-settings:
7676
extra-rules: true
7777
lang-version: "1.19"
7878
depguard:
79-
# TODO: use depguard to replace import checks in gitea-vet
8079
list-type: denylist
8180
# Check the list against standard lib.
8281
include-go-root: true
8382
packages-with-error-message:
8483
- encoding/json: "use gitea's modules/json instead of encoding/json"
8584
- github.com/unknwon/com: "use gitea's util and replacements"
85+
- io/ioutil: "use os or io instead"
86+
- golang.org/x/exp: "it's experimental and unreliable."
8687

8788
issues:
8889
max-issues-per-linter: 0

0 commit comments

Comments
 (0)