Skip to content

Commit

Permalink
another place change to isMatch requires the test to be reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
lhitchon committed Mar 9, 2018
1 parent e961429 commit 96e81bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func searchAndMatch(filter Filter, resource TerraformResource, log LoggingFuncti
o := unquoted(searchData(filter.Key, resource.Properties))
status := isMatch(o, filter.Op, filter.Value)
log(fmt.Sprintf("Key: %s Output: %s Looking for %s %s", filter.Key, o, filter.Op, filter.Value))
log(fmt.Sprintf("ResourceId: %s Type: %s %s",
log(fmt.Sprintf("ResourceId: %s Type: %s %t",
resource.Id,
resource.Type,
status))
Expand Down Expand Up @@ -274,7 +274,7 @@ func searchAndTest(rule Rule, filter Filter, resource TerraformResource, log Log
if filter.Not != nil && len(filter.Not) > 0 {
return notOperation(rule, filter.Not, resource, log)
}
if searchAndMatch(filter, resource, log) {
if !searchAndMatch(filter, resource, log) {
status = rule.Severity
}
return status
Expand Down

0 comments on commit 96e81bc

Please sign in to comment.