Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
Move value computation out of a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
tucksaun committed Feb 28, 2023
1 parent 7001dd5 commit 421c6c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ func Analyze(lock *Lock, db *AdvisoryDB, noDevPackages bool) *Vulnerabilities {
for _, p := range packages {
var advs []SimpleAdvisory
composerReference := "composer://" + p.Name
packageBranchName := normalizeVersion(string(p.Version))
for _, a := range db.Advisories {
if a.Reference != composerReference {
continue
}
packageBranchName := normalizeVersion(string(p.Version))
for branchName, branch := range a.Branches {
// dev versions must be checked via a date
if isDev(p) {
Expand Down

0 comments on commit 421c6c3

Please sign in to comment.