Chore: Add depgaurd rules for sub-modules (#84084)

This commit is contained in:
Todd Treece 2024-03-25 13:15:36 -04:00 committed by GitHub
parent dd7d4e2656
commit 9684a9e39a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,6 +67,33 @@ files = [
"**/pkg/tsdb/cloudwatch/**/*",
]
[linters-settings.depguard.rules.apiserver]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/apimachinery",
"github.com/grafana/grafana/pkg/apiserver",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "apiserver is not allowed to import grafana core" }
]
files = [
"**/pkg/apiserver/*",
"**/pkg/apiserver/**/*"
]
[linters-settings.depguard.rules.apimachinery]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/apimachinery",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "apimachinery is not allowed to import grafana core" }
]
files = [
"**/pkg/apimachinery/*",
"**/pkg/apimachinery/**/*"
]
[linters-settings.depguard.rules.promlib]
list-mode = "lax" # allow unless explicitely denied
deny = [