From b39f87e710377001a635c7389034ca7830355b9a Mon Sep 17 00:00:00 2001
From: Mike McQuaid <mike@mikemcquaid.com>
Date: Mon, 24 Oct 2016 14:54:28 +0100
Subject: [PATCH] audit: check for alpha/beta/rc usage in URLs.

Stable URLs should not use unstable versions.
---
 Library/Homebrew/dev-cmd/audit.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 12eaf9167e..311a961dcb 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -637,6 +637,8 @@ class FormulaAuditor
 
     stable = formula.stable
     case stable && stable.url
+    when /[\d\._-](alpha|beta|rc\d)/
+      problem "Stable version URLs should not contain #{$1}"
     when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i
       version = Version.parse(stable.url)
       if version >= Version.create("1.0")
-- 
GitLab