dev-cmd/audit: check resource name does not match formula name

This commit is contained in:
Alexander Bayandin 2019-11-26 00:58:35 +00:00
parent 83d851351a
commit 349f37be68

View File

@ -667,6 +667,8 @@ module Homebrew
problems.concat ra.problems.map { |problem| "#{name}: #{problem}" }
spec.resources.each_value do |resource|
problem "Resource name should be different from the formula name" if resource.name == formula.name
ra = ResourceAuditor.new(resource, spec_name, online: @online, strict: @strict).audit
problems.concat ra.problems.map { |problem|
"#{name} resource #{resource.name.inspect}: #{problem}"