Skip to content

Commit

Permalink
add missing name metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Kemosabert <[email protected]>
  • Loading branch information
Kemosabert committed Dec 3, 2024
1 parent 39e374f commit bf60621
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions syft/internal/packagemetadata/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var jsonTypes = makeJSONTypes(
jsonNamesWithoutLookup(pkg.RustBinaryAuditEntry{}, "rust-cargo-audit-entry", "RustCargoPackageMetadata"), // the legacy value is split into two types, where the other is preferred
jsonNames(pkg.WordpressPluginEntry{}, "wordpress-plugin-entry", "WordpressMetadata"),
jsonNames(pkg.LuaRocksPackage{}, "luarocks-package"),
jsonNames(pkg.DotnetPackagesLockEntry{}, "dotnet-packages-lock-entry", "DotnetPackagesLockEntry"),
)

func expandLegacyNameVariants(names ...string) []string {
Expand Down
6 changes: 6 additions & 0 deletions syft/internal/packagemetadata/names_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ func Test_JSONName_JSONLegacyName(t *testing.T) {
expectedJSONName: "dotnet-deps-entry",
expectedLegacyName: "DotnetDepsMetadata",
},
{
name: "DotnetPackagesLockEntry",
metadata: pkg.DotnetPackagesLockEntry{},
expectedJSONName: "dotnet-packages-lock-entry",
expectedLegacyName: "DotnetPackagesLockEntry",
},
{
name: "DotnetPortableExecutableMetadata",
metadata: pkg.DotnetPortableExecutableEntry{},
Expand Down

0 comments on commit bf60621

Please sign in to comment.