audit: imporve revision check logic
* Check revision decrease against both stable and devel spec. * Check revision reset only for stable spec if stable spec is available.
This commit is contained in:
parent
176f345386
commit
d4c7dedf12
@ -588,8 +588,14 @@ class FormulaAuditor
|
||||
revision_map = fv.revision_map("origin/master")
|
||||
if (revisions = revision_map[formula.version]).any?
|
||||
problem "revision should not decrease" if formula.revision < revisions.max
|
||||
else
|
||||
problem "revision should be removed" unless formula.revision == 0
|
||||
elsif formula.revision != 0
|
||||
if formula.stable
|
||||
if revision_map[formula.stable.version].empty? # check stable spec
|
||||
problem "revision should be removed"
|
||||
end
|
||||
else # head/devel-only formula
|
||||
problem "revision should be removed"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user