aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2016-08-17 11:07:17 +0100
committerGitHub2016-08-17 11:07:17 +0100
commitcf71e30180d44219836ef129d5e5f00325210dfb (patch)
tree220d3832242f35bb9944562b020261d2f4314695 /Library/Homebrew/cmd
parent5bbc3c21f2235c37be2c01b6d133abcbe2070fb3 (diff)
parented5e2ea3003acc858e0886cb1c4a944f44ba598e (diff)
downloadbrew-cf71e30180d44219836ef129d5e5f00325210dfb.tar.bz2
Merge pull request #724 from MikeMcQuaid/assume-ruby-two
Assume Ruby 2
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 0845faeb3..b46f47ab5 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -37,8 +37,6 @@ require "cmd/style"
require "date"
module Homebrew
- RUBY_2_OR_LATER = RUBY_VERSION.split(".").first.to_i >= 2
-
def audit
if ARGV.switch? "D"
Homebrew.inject_dump_stats!(FormulaAuditor, /^audit_/)
@@ -49,7 +47,6 @@ module Homebrew
new_formula = ARGV.include? "--new-formula"
strict = new_formula || ARGV.include?("--strict")
- style = strict && RUBY_2_OR_LATER
online = new_formula || ARGV.include?("--online")
ENV.activate_extensions!
@@ -62,14 +59,15 @@ module Homebrew
ff = ARGV.resolved_formulae
files = ARGV.resolved_formulae.map(&:path)
end
- if style
+
+ if strict
# Check style in a single batch run up front for performance
style_results = check_style_json(files, :realpath => true)
end
ff.each do |f|
options = { :new_formula => new_formula, :strict => strict, :online => online }
- options[:style_offenses] = style_results.file_offenses(f.path) if style
+ options[:style_offenses] = style_results.file_offenses(f.path) if strict
fa = FormulaAuditor.new(f, options)
fa.audit