diff options
| author | Xu Cheng | 2015-05-24 03:05:00 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-05-24 20:07:44 +0800 |
| commit | 60f23778533100997715e2dd52a400a50a62e8ca (patch) | |
| tree | 5ca00dfe3fd57f811be2fabb2ad62d095ab7a7d6 | |
| parent | 78ccd4125124024e4e73734a54059a8af994791d (diff) | |
| download | brew-60f23778533100997715e2dd52a400a50a62e8ca.tar.bz2 | |
audit: formula version string should have digit
Closes Homebrew/homebrew#40025.
Signed-off-by: Xu Cheng <xucheng@me.com>
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index be6be5c39..7d0230ab2 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -350,6 +350,14 @@ class FormulaAuditor spec.patches.select(&:external?).each { |p| audit_patch(p) } end + %w[Stable Devel].each do |name| + next unless spec = formula.send(name.downcase) + version = spec.version + if version.to_s !~ /\d/ + problem "#{name}: version (#{version}) is set to a string without a digit" + end + end + if formula.stable && formula.devel if formula.devel.version < formula.stable.version problem "devel version #{formula.devel.version} is older than stable version #{formula.stable.version}" |
