aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2017-10-09 16:48:01 +0100
committerDominyk Tiller2017-10-10 15:45:41 +0100
commit0865ab0d1b25c9f6809c07fe6f4c02e71c2f0d27 (patch)
tree66aab028b4cbdc0f6a62c777f7cc1a6e8490ffac /Library
parenta0f48619341c2cf6f1980a019bcd4005cf066e21 (diff)
downloadbrew-0865ab0d1b25c9f6809c07fe6f4c02e71c2f0d27.tar.bz2
audit: nudge to use predicate for 'executable?' as well
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 4d9000fed..a9d27afa9 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -978,6 +978,10 @@ class FormulaAuditor
problem "Use `refute_predicate <path_to_file>, :exist?` instead of `#{Regexp.last_match(1)}`"
end
+ if line =~ /(assert File\.executable\?|assert \(.*\)\.executable\?)/
+ problem "Use `assert_predicate <path_to_file>, :executable?` instead of `#{Regexp.last_match(1)}`"
+ end
+
return unless @strict
problem "`#{Regexp.last_match(1)}` in formulae is deprecated" if line =~ /(env :(std|userpaths))/