Skip to content

chore: reduce duplicate case SwiftPkg#2696

Merged
spiffcs merged 1 commit intoanchore:mainfrom
testwill:dup_case
Mar 7, 2024
Merged

chore: reduce duplicate case SwiftPkg#2696
spiffcs merged 1 commit intoanchore:mainfrom
testwill:dup_case

Conversation

@testwill
Copy link
Copy Markdown
Contributor

@testwill testwill commented Mar 7, 2024

No description provided.

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
Comment thread syft/pkg/language.go
case string(Dotnet), ".net", packageurl.TypeNuget:
return Dotnet
case packageurl.TypeCocoapods, packageurl.TypeSwift, string(CocoapodsPkg), string(SwiftPkg):
case packageurl.TypeCocoapods, packageurl.TypeSwift, string(CocoapodsPkg):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the slate of PRs @testwill - I'll take some time today to validate these today. I'm trying to figure out why this was duplicated in the first place:

// TypeCocoapods is a pkg:cocoapods purl.
--
66 | TypeCocoapods = "cocoapods"
CocoapodsPkg          Type = "pod"]

Looks like these are two different strings here so it's not a duplicate case =)

Thanks for the due diligence on checking this though.

Closing for now given the different names.

If you think this could be clearer let me know and I can reopen and we can figure out what the chance should be

Copy link
Copy Markdown
Contributor

@spiffcs spiffcs Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 - my fault I totally switched gears and looked at the wrong value change - this is good to go!

https://github.com/package-url/packageurl-go/blob/7cb81af9593b9512bb946c55c85609948c48aab9/packageurl.go#L114

SwiftPkg Type = "swift"

Same string

@spiffcs spiffcs closed this Mar 7, 2024
@spiffcs spiffcs reopened this Mar 7, 2024
@spiffcs spiffcs enabled auto-merge (squash) March 7, 2024 18:08
@spiffcs spiffcs merged commit 3743f5a into anchore:main Mar 7, 2024
@testwill testwill deleted the dup_case branch March 8, 2024 00:56
@spiffcs spiffcs added the bug Something isn't working label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants