diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 8c700f42e8..a5221fe376 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -588,8 +588,14 @@ class FormulaAuditor revision_map = fv.revision_map("origin/master") if (revisions = revision_map[formula.version]).any? problem "revision should not decrease" if formula.revision < revisions.max - else - problem "revision should be removed" unless formula.revision == 0 + elsif formula.revision != 0 + if formula.stable + if revision_map[formula.stable.version].empty? # check stable spec + problem "revision should be removed" + end + else # head/devel-only formula + problem "revision should be removed" + end end end