Skip to content

Commit

Permalink
fix(dotnet): improve forming dotnet package names
Browse files Browse the repository at this point in the history
Signed-off-by: Weston Steimel <[email protected]>
  • Loading branch information
westonsteimel committed Jan 31, 2024
1 parent 31e0fc3 commit 4eb1491
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions syft/pkg/cataloger/dotnet/parse_dotnet_portable_executable.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ func findName(versionResources map[string]string) string {
if value == "" {
continue
}

value = strings.ReplaceAll(value, " ", ".")

if strings.HasPrefix(value, ".dll") {

Check failure on line 194 in syft/pkg/cataloger/dotnet/parse_dotnet_portable_executable.go

View workflow job for this annotation

GitHub Actions / Static analysis

S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix` (gosimple)
value = strings.TrimPrefix(value, ".dll")
}

return value
}

Expand Down

0 comments on commit 4eb1491

Please sign in to comment.