aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2017-10-08 00:05:24 -0700
committerGitHub2017-10-08 00:05:24 -0700
commitb56817922220b80ef3a04d60b19444e640db3deb (patch)
treef16a07840d1ebac155d8de8ef44d59044ea9849a /Library
parent30ac0408657476b8e825dd20b8d62882c42b68f9 (diff)
parent2a25825a12897b7bfa167a720f24b6df03bdca94 (diff)
downloadbrew-b56817922220b80ef3a04d60b19444e640db3deb.tar.bz2
Merge pull request #3287 from DomT4/assert_predicate_audit
audit: tweak assert/refute_predicate audit
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index ee5fb8df8..16ae7cba1 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -967,12 +967,12 @@ class FormulaAuditor
problem "Use `assert_match` instead of `assert ...include?`"
end
- if line =~ /(assert File\.exist\?|File\.exist\?)/
+ if line =~ /(assert File\.exist\?|assert \(.*\)\.exist\?)/
problem "Use `assert_predicate <path_to_file>, :exist?` instead of `#{Regexp.last_match(1)}`"
end
- if line =~ /(assert !File\.exist\?|!File\.exist\?)/
- problem "Use `refute_predicate <path_to_file>, :exist?` instead of `#{Regexp.last_match(1)}`"
+ if line =~ /assert !File\.exist\?/
+ problem "Use `refute_predicate <path_to_file>, :exist?` instead of `assert !File.exist?`"
end
return unless @strict