audit: broaden refute_predicate nudge
This commit is contained in:
parent
56458f03fc
commit
a0f4861934
@ -974,8 +974,8 @@ class FormulaAuditor
|
||||
problem "Use `assert_predicate <path_to_file>, :exist?` instead of `#{Regexp.last_match(1)}`"
|
||||
end
|
||||
|
||||
if line =~ /assert !File\.exist\?/
|
||||
problem "Use `refute_predicate <path_to_file>, :exist?` instead of `assert !File.exist?`"
|
||||
if line =~ /(assert !File\.exist\?|assert !\(.*\)\.exist\?)/
|
||||
problem "Use `refute_predicate <path_to_file>, :exist?` instead of `#{Regexp.last_match(1)}`"
|
||||
end
|
||||
|
||||
return unless @strict
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user