From 0fe8c02b3c14838939a1e6ac3d69d00ec98bb1cf Mon Sep 17 00:00:00 2001 From: commitay Date: Thu, 7 Jun 2018 16:34:39 +1000 Subject: [PATCH] audit: throttled formulae --- Library/Homebrew/dev-cmd/audit.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 61cede8f27..7ebcab810d 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -575,6 +575,21 @@ module Homebrew new_formula_problem "Formulae should not have a HEAD spec" end + thottled = %w[ + aws-sdk-cpp 10 + awscli 10 + heroku 10 + quicktype 10 + vim 50 + ] + + thottled.each_slice(2).to_a.map do |a, b| + version = formula.stable.version.to_s.split(".").last.to_i + if @strict && a.include?(formula.name) && version.modulo(b.to_i).nonzero? + problem "should only be updated every #{b} releases on multiples of #{b}" + end + end + unstable_whitelist = %w[ aalib 1.4rc5 angolmois 2.0.0alpha2