Add cataloger for Swift Package Manager. (#1919)

Signed-off-by: Tristan Farkas <Tristan.Farkas@axis.com>
This commit is contained in:
Tristan Farkas
2023-07-25 14:35:21 -04:00
committed by GitHub
parent 9a73380f29
commit e1c1832f84
24 changed files with 2353 additions and 14 deletions
@@ -54,6 +54,8 @@ func SourceInfo(p pkg.Package) string {
answer = "acquired package info from nix store path"
case pkg.Rpkg:
answer = "acquired package info from R-package DESCRIPTION file"
case pkg.SwiftPkg:
answer = "acquired package info from resolved Swift package manifest"
default:
answer = "acquired package info from the following paths"
}
@@ -231,6 +231,14 @@ func Test_SourceInfo(t *testing.T) {
"acquired package info from R-package DESCRIPTION file",
},
},
{
input: pkg.Package{
Type: pkg.SwiftPkg,
},
expected: []string{
"from resolved Swift package manifest",
},
},
}
var pkgTypes []pkg.Type
for _, test := range tests {