add golangci-lint rule to prevent imports of repository internals

This commit is contained in:
Michael Eischer
2026-05-31 18:20:37 +02:00
parent 042feb2b7f
commit 49c7364e79
+7
View File
@@ -40,6 +40,13 @@ linters:
desc: "internal/restic should not be imported to keep the architectural layers intact"
- pkg: "github.com/restic/restic/internal/repository"
desc: "internal/repository should not be imported to keep the architectural layers intact"
repository-internals:
files:
- "**"
- "!**/internal/repository/**"
deny:
- pkg: "github.com/restic/restic/internal/repository/"
desc: "packages below internal/repository should not be imported to not depend on repository internals"
importas:
alias:
- pkg: github.com/restic/restic/internal/test