diff options
| author | Mike McQuaid | 2016-11-17 17:13:52 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2016-11-17 17:13:52 +0000 |
| commit | b7f0edd1fd7c5f81960a80d8073062451432df7a (patch) | |
| tree | 17d1b441528121c703280d89a5ac998104b79784 /Library | |
| parent | 649c7ab48ae013f07a29a706b63d4d778e456b24 (diff) | |
| download | brew-b7f0edd1fd7c5f81960a80d8073062451432df7a.tar.bz2 | |
audit: don't check devel version_scheme/revision.
These are formulae-wide so doesn't make sense to iterate through these
for specs and get weird results.
As seem in https://github.com/Homebrew/homebrew-core/pull/6952.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index df3b5fafe..89d4b00e5 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -666,21 +666,21 @@ class FormulaAuditor attributes_map = fv.version_attributes_map(attributes, "origin/master") - [:stable, :devel].each do |spec| - attributes.each do |attribute| - spec_attribute_map = attributes_map[attribute][spec] - next if spec_attribute_map.nil? || spec_attribute_map.empty? + attributes.each do |attribute| + stable_attribute_map = attributes_map[attribute][:stable] + next if stable_attribute_map.nil? || stable_attribute_map.empty? - attributes_for_version = spec_attribute_map[formula.version] - next if attributes_for_version.nil? || attributes_for_version.empty? + attributes_for_version = stable_attribute_map[formula.version] + next if attributes_for_version.nil? || attributes_for_version.empty? - old_attribute = formula.send(attribute) - max_attribute = attributes_for_version.max - if max_attribute && old_attribute < max_attribute - problem "#{spec} #{attribute} should not decrease (from #{max_attribute} to #{old_attribute})" - end + old_attribute = formula.send(attribute) + max_attribute = attributes_for_version.max + if max_attribute && old_attribute < max_attribute + problem "#{attribute} should not decrease (from #{max_attribute} to #{old_attribute})" end + end + [:stable, :devel].each do |spec| spec_version_scheme_map = attributes_map[:version_scheme][spec] next if spec_version_scheme_map.nil? || spec_version_scheme_map.empty? |
