aboutsummaryrefslogtreecommitdiffstats
path: root/.golangci.yml
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-01-12 23:35:53 +0800
committerGitHub <noreply@github.com>2023-01-12 23:35:53 +0800
commitc86be819bb0d407c3e530bafd31b18cdd0be1116 (patch)
treed1d0d8506728576e540a6c60758490ab2a66779e /.golangci.yml
parent9ffaf19d89b24589f4f4ec1211881102cafc7370 (diff)
downloadgitea-c86be819bb0d407c3e530bafd31b18cdd0be1116.tar.gz
gitea-c86be819bb0d407c3e530bafd31b18cdd0be1116.zip
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 <john.olheiser@gmail.com>
Diffstat (limited to '.golangci.yml')
-rw-r--r--.golangci.yml3
1 files changed, 2 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 130ad286b5..7635e83a37 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -76,13 +76,14 @@ linters-settings:
extra-rules: true
lang-version: "1.19"
depguard:
- # TODO: use depguard to replace import checks in gitea-vet
list-type: denylist
# Check the list against standard lib.
include-go-root: true
packages-with-error-message:
- encoding/json: "use gitea's modules/json instead of encoding/json"
- github.com/unknwon/com: "use gitea's util and replacements"
+ - io/ioutil: "use os or io instead"
+ - golang.org/x/exp: "it's experimental and unreliable."
issues:
max-issues-per-linter: 0