aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominyk Tiller2015-01-24 23:36:33 +0000
committerMike McQuaid2015-01-26 14:39:12 +0000
commit607a6922e541b5c491642b5e4b58fa6aea7e596c (patch)
treec1e1953062ba842d986c2dcc2b7bdfd798466255
parentc3e1ca0050d12e8873f2260d9d9bd3ec58d3607c (diff)
downloadhomebrew-607a6922e541b5c491642b5e4b58fa6aea7e596c.tar.bz2
audit: stop red-flagging devel-only
Currently the bot is failing certain devel-only formulae because it thinks having ` devel ` defined with an added ` head ` defined as well = a head-only formula. ``` ==> audit problems docker-machine: * Head-only (no stable download) ``` This is a pretty simple fix for that problem: ``` ==> brew style docker-machine 1 file inspected, no offenses detected ``` Closes #36197. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Homebrew/cmd/audit.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 648ea0490..4c9896569 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -359,6 +359,10 @@ class FormulaAuditor
problem "Head-only (no stable download)"
end
+ if devel_only?(formula) && formula.tap != "homebrew/homebrew-devel-only"
+ problem "Devel-only (no stable download)"
+ end
+
%w[Stable Devel HEAD].each do |name|
next unless spec = formula.send(name.downcase)
@@ -696,7 +700,11 @@ class FormulaAuditor
end
def head_only?(formula)
- formula.head && formula.stable.nil?
+ formula.head && formula.devel.nil? && formula.stable.nil?
+ end
+
+ def devel_only?(formula)
+ formula.devel && formula.stable.nil?
end
end