Complete forge delivery regression coverage

This commit is contained in:
2026-11-01 18:30:52 +00:00
parent 2e617db23c
commit c3f6eeb6df
12 changed files with 575 additions and 1686 deletions

View File

@@ -226,6 +226,33 @@ func checkImportDirections(packages []listedPackage) error {
}
visit(modulePath + "/buildinfo")
for _, root := range []string{
modulePath + "/internal/delivery",
modulePath + "/internal/forge",
modulePath + "/internal/artifact",
} {
seen := make(map[string]bool)
var visitDelivery func(string)
visitDelivery = func(path string) {
if seen[path] {
return
}
seen[path] = true
if path == modulePath+"/internal/gitea" {
violations = append(violations, fmt.Sprintf("shared package %s depends on Gitea adapter", root))
return
}
pkg, ok := byPath[path]
if !ok {
return
}
for _, imported := range pkg.Imports {
visitDelivery(imported)
}
}
visitDelivery(root)
}
if len(violations) == 0 {
return nil
}