audit: complain about uppercase formula names

Check for uppercase formula names in audit_formula_name method
of formula_auditor.
This commit is contained in:
Steve Peters 2021-05-27 17:55:28 -07:00 committed by GitHub
parent ca6fc4873e
commit 9b9d25d27f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,11 +120,13 @@ module Homebrew
end end
def audit_formula_name def audit_formula_name
name = formula.name
problem "Formula name '#{name}' must not contain uppercase letters." if name != name.downcase
return unless @strict return unless @strict
return unless @core_tap return unless @core_tap
name = formula.name
problem "'#{name}' is not allowed in homebrew/core." if MissingFormula.disallowed_reason(name) problem "'#{name}' is not allowed in homebrew/core." if MissingFormula.disallowed_reason(name)
if Formula.aliases.include? name if Formula.aliases.include? name