Skip to content

Commit

Permalink
refactor: define a variable for name
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <knqyf263@gmail.com>
  • Loading branch information
knqyf263 committed Jun 19, 2024
1 parent 23ce7e6 commit 3b43605
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/dependency/parser/sbt/lockfile/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ func (Parser) Parse(r xio.ReadSeekerAt) ([]ftypes.Package, []ftypes.Dependency,

for _, dep := range lockfile.Dependencies {
if slices.ContainsFunc(dep.Configurations, isIncludedConfig) {
name := dep.Organization + ":" + dep.Name
libraries = append(libraries, ftypes.Package{
ID: dependency.ID(ftypes.Sbt, dep.Organization+":"+dep.Name, dep.Version),
Name: dep.Organization + ":" + dep.Name,
Version: dep.Version,
Locations: []ftypes.Location{{StartLine: dep.StartLine, EndLine: dep.EndLine}},
ID: dependency.ID(ftypes.Sbt, name, dep.Version),
Name: name,
Version: dep.Version,
Locations: []ftypes.Location{
{
StartLine: dep.StartLine,
EndLine: dep.EndLine,
},
},
})
}
}
Expand Down

0 comments on commit 3b43605

Please sign in to comment.