Skip to content

Commit

Permalink
rename variables to address static analysis findings
Browse files Browse the repository at this point in the history
  • Loading branch information
jhebden-gl committed Sep 28, 2023
1 parent cc6319f commit 62f13df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/grype/cli/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ func runGrype(app clio.Application, opts *options.Grype, userInput string) (errs
opts.Ignore = append(opts.Ignore, ignoreFixedMatches...)
}

for _, ignore_state := range opts.IgnoreStates {
switch grypeDb.FixState(ignore_state) {
for _, ignoreState := range opts.IgnoreStates {
switch grypeDb.FixState(ignoreState) {
case grypeDb.UnknownFixState, grypeDb.FixedState, grypeDb.NotFixedState, grypeDb.WontFixState:
opts.Ignore = append(opts.Ignore, match.IgnoreRule{FixState: ignore_state})
opts.Ignore = append(opts.Ignore, match.IgnoreRule{FixState: ignoreState})
default:
log.Warnf("ignoring unknown fix state %s for --ignore-states", ignore_state)
log.Warnf("ignoring unknown fix state %s for --ignore-states", ignoreState)
}
}

Expand Down

0 comments on commit 62f13df

Please sign in to comment.