From 127461d8792ff9a638c86bfaaedbed3cda2d38db Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine <b@ptistefontaine.fr> Date: Sun, 30 Oct 2016 10:38:37 +0100 Subject: [PATCH] audit: don't check new formulae revision/versions. --- Library/Homebrew/dev-cmd/audit.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 3cebfc2256..e83cf1b8cf 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -653,6 +653,7 @@ class FormulaAuditor def audit_revision_and_version_scheme return unless formula.tap # skip formula not from core or any taps return unless formula.tap.git? # git log is required + return if @new_formula fv = FormulaVersions.new(formula, max_depth: 10) no_decrease_attributes = [:revision, :version_scheme] @@ -668,7 +669,7 @@ class FormulaAuditor end versions = attributes_map[:version].values.flatten - if formula.version < versions.max + if !versions.empty? && formula.version < versions.max problem "version should not decrease" end -- GitLab