Merge pull request #13926 from SMillerDev/feature/audit/complain_no_subjects

Audit: complain if no targets are found
This commit is contained in:
Sean Molenaar 2022-09-26 16:05:56 +02:00 committed by GitHub
commit 520d9c3ab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,6 +141,12 @@ module Homebrew
args.named.to_formulae_and_casks args.named.to_formulae_and_casks
.partition { |formula_or_cask| formula_or_cask.is_a?(Formula) } .partition { |formula_or_cask| formula_or_cask.is_a?(Formula) }
end end
if audit_formulae.empty? && audit_casks.empty?
ofail "No matching formulae or casks to audit!"
return
end
style_files = args.named.to_paths unless skip_style style_files = args.named.to_paths unless skip_style
only_cops = args.only_cops only_cops = args.only_cops