Skip to content

Commit

Permalink
fix: Work-around to keep result consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Apr 26, 2022
1 parent 8aaa1d4 commit 8a3e927
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cmd/idea_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ func generatePluginOutput(ctx *inspector.ScanContext) *PluginOutput {
Language: mod.Language,
FixType: comp.FixType,
}
for _, it := range comp.MinFixedInfo {
p.MinFixed = append(p.MinFixed, PluginCompFix{
OldVersion: it.OldVersion,
NewVersion: it.NewVersion,
CompName: it.Name,
})
// Work-around to keep result consistency.
if len(rs[cid].MinFixed) > 0 {
p.MinFixed = rs[cid].MinFixed
} else {
for _, it := range comp.MinFixedInfo {
p.MinFixed = append(p.MinFixed, PluginCompFix{
OldVersion: it.OldVersion,
NewVersion: it.NewVersion,
CompName: it.Name,
})
}
}
if comp.License != nil {
p.License = &PluginCompLicense{
Expand Down

0 comments on commit 8a3e927

Please sign in to comment.