From f0270a585cc37e5b84d70404bf434c6f69c7672d Mon Sep 17 00:00:00 2001
From: EricFromCanada <enk3@outlook.com>
Date: Wed, 11 Dec 2019 14:59:47 -0500
Subject: [PATCH] desc/audit: remove messages obviated by new arg parser

---
 Library/Homebrew/cmd/desc.rb      |  6 +-----
 Library/Homebrew/dev-cmd/audit.rb | 11 ++---------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/Library/Homebrew/cmd/desc.rb b/Library/Homebrew/cmd/desc.rb
index 46f50430a6..1e8293be21 100644
--- a/Library/Homebrew/cmd/desc.rb
+++ b/Library/Homebrew/cmd/desc.rb
@@ -40,11 +40,7 @@ module Homebrew
     search_type << :either if args.search
     search_type << :name   if args.name
     search_type << :desc   if args.description
-    if search_type.size > 1
-      odie "Pick one, and only one, of -s/--search, -n/--name, or -d/--description."
-    elsif search_type.present? && ARGV.named.empty?
-      odie "You must provide a search term."
-    end
+    odie "You must provide a search term." if search_type.present? && ARGV.named.empty?
 
     results = if search_type.empty?
       raise FormulaUnspecifiedError if ARGV.named.empty?
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 1dda5cb067..2b43cba6ce 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -57,7 +57,8 @@ module Homebrew
       switch :verbose
       switch :debug
       conflicts "--only", "--except"
-      conflicts "--only-cops", "--except-cops"
+      conflicts "--only-cops", "--except-cops", "--strict"
+      conflicts "--only-cops", "--except-cops", "--only"
     end
   end
 
@@ -88,13 +89,6 @@ module Homebrew
 
     only_cops = args.only_cops
     except_cops = args.except_cops
-
-    if only_cops && except_cops
-      odie "--only-cops and --except-cops cannot be used simultaneously!"
-    elsif (only_cops || except_cops) && (strict || args.only)
-      odie "--only-cops/--except-cops and --strict/--only cannot be used simultaneously!"
-    end
-
     options = { fix: args.fix? }
 
     if only_cops
@@ -995,7 +989,6 @@ module Homebrew
     def audit
       only_audits = @only
       except_audits = @except
-      odie "--only and --except cannot be used simultaneously!" if only_audits && except_audits
 
       methods.map(&:to_s).grep(/^audit_/).each do |audit_method_name|
         name = audit_method_name.gsub(/^audit_/, "")
-- 
GitLab