diff options
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 43 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/man.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/tests.rb | 5 |
3 files changed, 9 insertions, 43 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index ff6b17b45..4bcfdd128 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -87,10 +87,14 @@ module Homebrew if !only_cops.empty? options[:only_cops] = only_cops ARGV.push("--only=style") + elsif new_formula + options[:only_cops] = [:FormulaAudit, :FormulaAuditStrict, :NewFormulaAudit] + elsif strict + options[:only_cops] = [:FormulaAudit, :FormulaAuditStrict] elsif !except_cops.empty? options[:except_cops] = except_cops elsif !strict - options[:except_cops] = [:FormulaAuditStrict] + options[:except_cops] = [:FormulaAuditStrict, :NewFormulaAudit] end # Check style in a single batch run up front for performance @@ -519,15 +523,6 @@ class FormulaAuditor problem "Ambiguous conflicting formula #{c.name.inspect}." end end - - versioned_conflicts_whitelist = %w[node@ bash-completion@].freeze - - return unless formula.conflicts.any? && formula.versioned_formula? - return if formula.name.start_with?(*versioned_conflicts_whitelist) - problem <<-EOS - Versioned formulae should not use `conflicts_with`. - Use `keg_only :versioned_formula` instead. - EOS end def audit_keg_only_style @@ -562,34 +557,6 @@ class FormulaAuditor problem "keg_only reason should not end with a period." end - def audit_options - formula.options.each do |o| - if o.name == "32-bit" - problem "macOS has been 64-bit only since 10.6 so 32-bit options are deprecated." - end - - next unless @strict - - if o.name == "universal" - problem "macOS has been 64-bit only since 10.6 so universal options are deprecated." - end - - if o.name !~ /with(out)?-/ && o.name != "c++11" && o.name != "universal" - problem "Options should begin with with/without. Migrate '--#{o.name}' with `deprecated_option`." - end - - next unless o.name =~ /^with(out)?-(?:checks?|tests)$/ - unless formula.deps.any? { |d| d.name == "check" && (d.optional? || d.recommended?) } - problem "Use '--with#{Regexp.last_match(1)}-test' instead of '--#{o.name}'. Migrate '--#{o.name}' with `deprecated_option`." - end - end - - return unless @new_formula - return if formula.deprecated_options.empty? - return if formula.versioned_formula? - problem "New formulae should not use `deprecated_option`." - end - def audit_homepage homepage = formula.homepage diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 7ca22575f..472bb7c2b 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -65,7 +65,9 @@ module Homebrew readme = HOMEBREW_REPOSITORY/"README.md" variables[:lead_maintainer] = readme.read[/(Homebrew's lead maintainer .*\.)/, 1] .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') - variables[:maintainers] = readme.read[/(Homebrew's current maintainers .*\.)/, 1] + variables[:core_maintainer] = readme.read[%r{(Homebrew/homebrew-core's lead maintainer .*\.)}, 1] + .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') + variables[:maintainers] = readme.read[/(Homebrew's other current maintainers .*\.)/, 1] .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') variables[:former_maintainers] = readme.read[/(Former maintainers .*\.)/, 1] .gsub(/\[([^\]]+)\]\([^)]+\)/, '\1') diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 658f2e2f3..af9dcc575 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -53,10 +53,7 @@ module Homebrew ENV["GIT_#{role}_DATE"] = "Sun Jan 22 19:59:13 2017 +0000" end - # TODO: unpin this version when this error no longer shows: - # bundler-1.15.0/lib/bundler/shared_helpers.rb:25: - # stack level too deep (SystemStackError) - Homebrew.install_gem_setup_path! "bundler", "1.14.6" + Homebrew.install_gem_setup_path! "bundler" system "bundle", "install" unless quiet_system("bundle", "check") parallel = true |
