mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
Finalize Conan v2 support (#2587)
* Add support for conan lock v2 (#2461) * conan lock 2.x requires field support Signed-off-by: houdini91 <mdstrauss91@gmail.com> * PR review, struct renaming Signed-off-by: houdini91 <mdstrauss91@gmail.com> --------- Signed-off-by: houdini91 <mdstrauss91@gmail.com> * decompose conanlock parser + add tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: houdini91 <mdstrauss91@gmail.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: mikey strauss <mdstrauss91@gmail.com>
This commit is contained in:
co-authored by
mikey strauss
parent
00d6269e3c
commit
c61f59e7b7
@@ -11,7 +11,8 @@ func AllTypes() []any {
|
||||
pkg.ApkDBEntry{},
|
||||
pkg.BinarySignature{},
|
||||
pkg.CocoaPodfileLockEntry{},
|
||||
pkg.ConanLockEntry{},
|
||||
pkg.ConanV1LockEntry{},
|
||||
pkg.ConanV2LockEntry{},
|
||||
pkg.ConanfileEntry{},
|
||||
pkg.ConaninfoEntry{},
|
||||
pkg.DartPubspecLockEntry{},
|
||||
|
||||
@@ -66,7 +66,8 @@ var jsonTypes = makeJSONTypes(
|
||||
jsonNames(pkg.ApkDBEntry{}, "apk-db-entry", "ApkMetadata"),
|
||||
jsonNames(pkg.BinarySignature{}, "binary-signature", "BinaryMetadata"),
|
||||
jsonNames(pkg.CocoaPodfileLockEntry{}, "cocoa-podfile-lock-entry", "CocoapodsMetadataType"),
|
||||
jsonNames(pkg.ConanLockEntry{}, "c-conan-lock-entry", "ConanLockMetadataType"),
|
||||
jsonNames(pkg.ConanV1LockEntry{}, "c-conan-lock-entry", "ConanLockMetadataType"),
|
||||
jsonNames(pkg.ConanV2LockEntry{}, "c-conan-lock-v2-entry"),
|
||||
jsonNames(pkg.ConanfileEntry{}, "c-conan-file-entry", "ConanMetadataType"),
|
||||
jsonNames(pkg.ConaninfoEntry{}, "c-conan-info-entry"),
|
||||
jsonNames(pkg.DartPubspecLockEntry{}, "dart-pubspec-lock-entry", "DartPubMetadata"),
|
||||
|
||||
@@ -103,7 +103,7 @@ func TestReflectTypeFromJSONName_LegacyValues(t *testing.T) {
|
||||
{
|
||||
name: "map pkg.ConanLockEntry struct type",
|
||||
input: "ConanLockMetadataType",
|
||||
expected: reflect.TypeOf(pkg.ConanLockEntry{}),
|
||||
expected: reflect.TypeOf(pkg.ConanV1LockEntry{}),
|
||||
},
|
||||
{
|
||||
name: "map pkg.ConanfileEntry struct type",
|
||||
@@ -290,7 +290,7 @@ func Test_JSONName_JSONLegacyName(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "ConanLockMetadata",
|
||||
metadata: pkg.ConanLockEntry{},
|
||||
metadata: pkg.ConanV1LockEntry{},
|
||||
expectedJSONName: "c-conan-lock-entry",
|
||||
expectedLegacyName: "ConanLockMetadataType",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user