diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 200b2597f3..a9d27afa98 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -974,8 +974,12 @@ class FormulaAuditor problem "Use `assert_predicate , :exist?` instead of `#{Regexp.last_match(1)}`" end - if line =~ /assert !File\.exist\?/ - problem "Use `refute_predicate , :exist?` instead of `assert !File.exist?`" + if line =~ /(assert !File\.exist\?|assert !\(.*\)\.exist\?)/ + problem "Use `refute_predicate , :exist?` instead of `#{Regexp.last_match(1)}`" + end + + if line =~ /(assert File\.executable\?|assert \(.*\)\.executable\?)/ + problem "Use `assert_predicate , :executable?` instead of `#{Regexp.last_match(1)}`" end return unless @strict