Merge pull request #9124 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.3.0
build(deps): bump rubocop from 1.2.0 to 1.3.0 in /Library/Homebrew
This commit is contained in:
commit
39d2152633
@ -197,6 +197,10 @@ Layout/RescueEnsureAlignment:
|
|||||||
Lint/AmbiguousBlockAssociation:
|
Lint/AmbiguousBlockAssociation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
Lint/DuplicateBranch:
|
||||||
|
Exclude:
|
||||||
|
- 'Taps/*/*/{Formula,Casks,}/*.rb'
|
||||||
|
|
||||||
# needed for lazy_object magic
|
# needed for lazy_object magic
|
||||||
Naming/MemoizedInstanceVariableName:
|
Naming/MemoizedInstanceVariableName:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|||||||
@ -98,13 +98,13 @@ GEM
|
|||||||
rspec-support (3.10.0)
|
rspec-support (3.10.0)
|
||||||
rspec-wait (0.0.9)
|
rspec-wait (0.0.9)
|
||||||
rspec (>= 3, < 4)
|
rspec (>= 3, < 4)
|
||||||
rubocop (1.2.0)
|
rubocop (1.3.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 2.7.1.5)
|
parser (>= 2.7.1.5)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8)
|
regexp_parser (>= 1.8)
|
||||||
rexml
|
rexml
|
||||||
rubocop-ast (>= 1.0.1)
|
rubocop-ast (>= 1.1.1)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 2.0)
|
unicode-display_width (>= 1.4.0, < 2.0)
|
||||||
rubocop-ast (1.1.1)
|
rubocop-ast (1.1.1)
|
||||||
|
|||||||
@ -67,14 +67,10 @@ class PATH
|
|||||||
|
|
||||||
sig { params(other: T.untyped).returns(T::Boolean) }
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
||||||
def ==(other)
|
def ==(other)
|
||||||
if other.respond_to?(:to_ary) && to_ary == other.to_ary
|
(other.respond_to?(:to_ary) && to_ary == other.to_ary) ||
|
||||||
true
|
(other.respond_to?(:to_str) && to_str == other.to_str) ||
|
||||||
elsif other.respond_to?(:to_str) && to_str == other.to_str
|
|
||||||
true
|
|
||||||
else
|
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def empty?
|
def empty?
|
||||||
|
|||||||
@ -53,11 +53,7 @@ class Build
|
|||||||
def expand_reqs
|
def expand_reqs
|
||||||
formula.recursive_requirements do |dependent, req|
|
formula.recursive_requirements do |dependent, req|
|
||||||
build = effective_build_options_for(dependent)
|
build = effective_build_options_for(dependent)
|
||||||
if req.prune_from_option?(build)
|
if req.prune_from_option?(build) || req.prune_if_build_and_not_dependent?(dependent, formula) || req.test?
|
||||||
Requirement.prune
|
|
||||||
elsif req.prune_if_build_and_not_dependent?(dependent, formula)
|
|
||||||
Requirement.prune
|
|
||||||
elsif req.test?
|
|
||||||
Requirement.prune
|
Requirement.prune
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -66,14 +62,12 @@ class Build
|
|||||||
def expand_deps
|
def expand_deps
|
||||||
formula.recursive_dependencies do |dependent, dep|
|
formula.recursive_dependencies do |dependent, dep|
|
||||||
build = effective_build_options_for(dependent)
|
build = effective_build_options_for(dependent)
|
||||||
if dep.prune_from_option?(build)
|
if dep.prune_from_option?(build) ||
|
||||||
Dependency.prune
|
dep.prune_if_build_and_not_dependent?(dependent, formula) ||
|
||||||
elsif dep.prune_if_build_and_not_dependent?(dependent, formula)
|
(dep.test? && !dep.build?)
|
||||||
Dependency.prune
|
Dependency.prune
|
||||||
elsif dep.build?
|
elsif dep.build?
|
||||||
Dependency.keep_but_prune_recursive_deps
|
Dependency.keep_but_prune_recursive_deps
|
||||||
elsif dep.test?
|
|
||||||
Dependency.prune
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -60,13 +60,10 @@ module Cask
|
|||||||
options[:quarantine] = true if options[:quarantine].nil?
|
options[:quarantine] = true if options[:quarantine].nil?
|
||||||
|
|
||||||
casks = args.named.flat_map do |name|
|
casks = args.named.flat_map do |name|
|
||||||
if File.exist?(name)
|
next name if File.exist?(name)
|
||||||
|
next Tap.fetch(name).cask_files if name.count("/") == 1
|
||||||
|
|
||||||
name
|
name
|
||||||
elsif name.count("/") == 1
|
|
||||||
Tap.fetch(name).cask_files
|
|
||||||
else
|
|
||||||
name
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
casks = casks.map { |c| CaskLoader.load(c, config: Config.from_args(args)) }
|
casks = casks.map { |c| CaskLoader.load(c, config: Config.from_args(args)) }
|
||||||
casks = Cask.to_a if casks.empty?
|
casks = Cask.to_a if casks.empty?
|
||||||
|
|||||||
@ -64,7 +64,7 @@ module Cask
|
|||||||
MacOSRequirement.new([version.to_sym], comparator: comparator)
|
MacOSRequirement.new([version.to_sym], comparator: comparator)
|
||||||
elsif /^\s*(?<comparator><|>|[=<>]=)\s*(?<version>\S+)\s*$/ =~ args.first
|
elsif /^\s*(?<comparator><|>|[=<>]=)\s*(?<version>\S+)\s*$/ =~ args.first
|
||||||
MacOSRequirement.new([version], comparator: comparator)
|
MacOSRequirement.new([version], comparator: comparator)
|
||||||
else
|
else # rubocop:disable Lint/DuplicateBranch
|
||||||
MacOSRequirement.new([args.first], comparator: "==")
|
MacOSRequirement.new([args.first], comparator: "==")
|
||||||
end
|
end
|
||||||
rescue MacOSVersionError => e
|
rescue MacOSVersionError => e
|
||||||
|
|||||||
@ -76,6 +76,12 @@ class Cleaner
|
|||||||
path.text_executable? || path.executable?
|
path.text_executable? || path.executable?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Both these files are completely unnecessary to package and cause
|
||||||
|
# pointless conflicts with other formulae. They are removed by Debian,
|
||||||
|
# Arch & MacPorts amongst other packagers as well. The files are
|
||||||
|
# created as part of installing any Perl module.
|
||||||
|
PERL_BASENAMES = Set.new(%w[perllocal.pod .packlist]).freeze
|
||||||
|
|
||||||
# Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
|
# Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
|
||||||
# permissions and removing .la files, unless the files (or parent
|
# permissions and removing .la files, unless the files (or parent
|
||||||
# directories) are protected by skip_clean.
|
# directories) are protected by skip_clean.
|
||||||
@ -93,18 +99,10 @@ class Cleaner
|
|||||||
|
|
||||||
next if path.directory?
|
next if path.directory?
|
||||||
|
|
||||||
if path.extname == ".la"
|
if path.extname == ".la" || PERL_BASENAMES.include?(path.basename.to_s)
|
||||||
path.unlink
|
path.unlink
|
||||||
elsif path.symlink?
|
elsif path.symlink?
|
||||||
# Skip it.
|
# Skip it.
|
||||||
elsif path.basename.to_s == "perllocal.pod"
|
|
||||||
# Both this file & the .packlist one below are completely unnecessary
|
|
||||||
# to package & causes pointless conflict with other formulae. They are
|
|
||||||
# removed by Debian, Arch & MacPorts amongst other packagers as well.
|
|
||||||
# The files are created as part of installing any Perl module.
|
|
||||||
path.unlink
|
|
||||||
elsif path.basename.to_s == ".packlist" # Hidden file, not file extension!
|
|
||||||
path.unlink
|
|
||||||
else
|
else
|
||||||
# Set permissions for executables and non-executables
|
# Set permissions for executables and non-executables
|
||||||
perms = if executable_path?(path)
|
perms = if executable_path?(path)
|
||||||
|
|||||||
@ -115,8 +115,6 @@ class DependencyCollector
|
|||||||
def parse_string_spec(spec, tags)
|
def parse_string_spec(spec, tags)
|
||||||
if spec.match?(HOMEBREW_TAP_FORMULA_REGEX)
|
if spec.match?(HOMEBREW_TAP_FORMULA_REGEX)
|
||||||
TapDependency.new(spec, tags)
|
TapDependency.new(spec, tags)
|
||||||
elsif tags.empty?
|
|
||||||
Dependency.new(spec, tags)
|
|
||||||
else
|
else
|
||||||
Dependency.new(spec, tags)
|
Dependency.new(spec, tags)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -440,24 +440,16 @@ module Homebrew
|
|||||||
if key == "cellar"
|
if key == "cellar"
|
||||||
# Prioritize HOMEBREW_CELLAR over :any over :any_skip_relocation
|
# Prioritize HOMEBREW_CELLAR over :any over :any_skip_relocation
|
||||||
cellars = [first, second]
|
cellars = [first, second]
|
||||||
if cellars.include?(HOMEBREW_CELLAR)
|
next HOMEBREW_CELLAR if cellars.include?(HOMEBREW_CELLAR)
|
||||||
HOMEBREW_CELLAR
|
next first if first.start_with?("/")
|
||||||
elsif first.start_with?("/")
|
next second if second.start_with?("/")
|
||||||
first
|
next "any" if cellars.include?("any")
|
||||||
elsif second.start_with?("/")
|
next "any_skip_relocation" if cellars.include?("any_skip_relocation")
|
||||||
second
|
|
||||||
elsif cellars.include?("any")
|
|
||||||
"any"
|
|
||||||
elsif cellars.include?("any_skip_relocation")
|
|
||||||
"any_skip_relocation"
|
|
||||||
else
|
|
||||||
second
|
|
||||||
end
|
end
|
||||||
else
|
|
||||||
second
|
second
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
any_cellars = ["any", "any_skip_relocation"]
|
any_cellars = ["any", "any_skip_relocation"]
|
||||||
bottles_hash.each do |formula_name, bottle_hash|
|
bottles_hash.each do |formula_name, bottle_hash|
|
||||||
|
|||||||
@ -1233,22 +1233,20 @@ class DownloadStrategyDetector
|
|||||||
when %r{^https?://(.+?\.)?googlecode\.com/svn},
|
when %r{^https?://(.+?\.)?googlecode\.com/svn},
|
||||||
%r{^https?://svn\.},
|
%r{^https?://svn\.},
|
||||||
%r{^svn://},
|
%r{^svn://},
|
||||||
|
%r{^svn\+http://},
|
||||||
|
%r{^http://svn\.apache\.org/repos/},
|
||||||
%r{^https?://(.+?\.)?sourceforge\.net/svnroot/}
|
%r{^https?://(.+?\.)?sourceforge\.net/svnroot/}
|
||||||
SubversionDownloadStrategy
|
SubversionDownloadStrategy
|
||||||
when %r{^cvs://}
|
when %r{^cvs://}
|
||||||
CVSDownloadStrategy
|
CVSDownloadStrategy
|
||||||
when %r{^hg://},
|
when %r{^hg://},
|
||||||
%r{^https?://(.+?\.)?googlecode\.com/hg}
|
%r{^https?://(.+?\.)?googlecode\.com/hg},
|
||||||
|
%r{^https?://(.+?\.)?sourceforge\.net/hgweb/}
|
||||||
MercurialDownloadStrategy
|
MercurialDownloadStrategy
|
||||||
when %r{^bzr://}
|
when %r{^bzr://}
|
||||||
BazaarDownloadStrategy
|
BazaarDownloadStrategy
|
||||||
when %r{^fossil://}
|
when %r{^fossil://}
|
||||||
FossilDownloadStrategy
|
FossilDownloadStrategy
|
||||||
when %r{^svn\+http://},
|
|
||||||
%r{^http://svn\.apache\.org/repos/}
|
|
||||||
SubversionDownloadStrategy
|
|
||||||
when %r{^https?://(.+?\.)?sourceforge\.net/hgweb/}
|
|
||||||
MercurialDownloadStrategy
|
|
||||||
else
|
else
|
||||||
CurlDownloadStrategy
|
CurlDownloadStrategy
|
||||||
end
|
end
|
||||||
|
|||||||
@ -116,7 +116,7 @@ module Hardware
|
|||||||
sysctl_bool("hw.optional.sse4_2")
|
sysctl_bool("hw.optional.sse4_2")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Note: this is more reliable than checking uname.
|
# NOTE: this is more reliable than checking uname.
|
||||||
# `sysctl` returns the right answer even when running in Rosetta 2.
|
# `sysctl` returns the right answer even when running in Rosetta 2.
|
||||||
def physical_cpu_arm64?
|
def physical_cpu_arm64?
|
||||||
sysctl_bool("hw.optional.arm64")
|
sysctl_bool("hw.optional.arm64")
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class Keg
|
|||||||
# remove all RPATHs from the file.
|
# remove all RPATHs from the file.
|
||||||
if ENV["HOMEBREW_RELOCATE_METAVARS"] &&
|
if ENV["HOMEBREW_RELOCATE_METAVARS"] &&
|
||||||
file.dynamically_linked_libraries.none? { |lib| lib.start_with?("@rpath") }
|
file.dynamically_linked_libraries.none? { |lib| lib.start_with?("@rpath") }
|
||||||
# Note: This could probably be made more efficient by reverse-sorting
|
# NOTE: This could probably be made more efficient by reverse-sorting
|
||||||
# the RPATHs by offset and calling MachOFile#delete_command
|
# the RPATHs by offset and calling MachOFile#delete_command
|
||||||
# with repopulate: false.
|
# with repopulate: false.
|
||||||
file.rpaths.each { |r| file.delete_rpath(r) }
|
file.rpaths.each { |r| file.delete_rpath(r) }
|
||||||
|
|||||||
@ -1270,10 +1270,8 @@ class Formula
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
if current_version
|
if current_version ||
|
||||||
[]
|
((head_version = latest_head_version) && !head_version_outdated?(head_version, fetch_head: fetch_head))
|
||||||
elsif (head_version = latest_head_version) &&
|
|
||||||
!head_version_outdated?(head_version, fetch_head: fetch_head)
|
|
||||||
[]
|
[]
|
||||||
else
|
else
|
||||||
all_kegs += old_installed_formulae.flat_map(&:installed_kegs)
|
all_kegs += old_installed_formulae.flat_map(&:installed_kegs)
|
||||||
|
|||||||
@ -534,13 +534,10 @@ class FormulaInstaller
|
|||||||
keep_build_test ||= req.test? && include_test? && dependent == f
|
keep_build_test ||= req.test? && include_test? && dependent == f
|
||||||
keep_build_test ||= req.build? && !install_bottle_for_dependent && !dependent.latest_version_installed?
|
keep_build_test ||= req.build? && !install_bottle_for_dependent && !dependent.latest_version_installed?
|
||||||
|
|
||||||
if req.prune_from_option?(build)
|
if req.prune_from_option?(build) ||
|
||||||
Requirement.prune
|
req.satisfied?(env: env, cc: cc, build_bottle: @build_bottle, bottle_arch: bottle_arch) ||
|
||||||
elsif req.satisfied?(env: env, cc: cc, build_bottle: @build_bottle, bottle_arch: bottle_arch)
|
((req.build? || req.test?) && !keep_build_test) ||
|
||||||
Requirement.prune
|
formula_deps_map[dependent.name]&.build?
|
||||||
elsif (req.build? || req.test?) && !keep_build_test
|
|
||||||
Requirement.prune
|
|
||||||
elsif (dep = formula_deps_map[dependent.name]) && dep.build?
|
|
||||||
Requirement.prune
|
Requirement.prune
|
||||||
else
|
else
|
||||||
unsatisfied_reqs[dependent] << req
|
unsatisfied_reqs[dependent] << req
|
||||||
@ -569,9 +566,7 @@ class FormulaInstaller
|
|||||||
keep_build_test ||= dep.test? && include_test? && include_test_formulae.include?(dependent.full_name)
|
keep_build_test ||= dep.test? && include_test? && include_test_formulae.include?(dependent.full_name)
|
||||||
keep_build_test ||= dep.build? && !install_bottle_for?(dependent, build) && !dependent.latest_version_installed?
|
keep_build_test ||= dep.build? && !install_bottle_for?(dependent, build) && !dependent.latest_version_installed?
|
||||||
|
|
||||||
if dep.prune_from_option?(build)
|
if dep.prune_from_option?(build) || ((dep.build? || dep.test?) && !keep_build_test)
|
||||||
Dependency.prune
|
|
||||||
elsif (dep.build? || dep.test?) && !keep_build_test
|
|
||||||
Dependency.prune
|
Dependency.prune
|
||||||
elsif dep.satisfied?(inherited_options[dep.name])
|
elsif dep.satisfied?(inherited_options[dep.name])
|
||||||
Dependency.skip
|
Dependency.skip
|
||||||
|
|||||||
@ -482,45 +482,46 @@ class Keg
|
|||||||
|
|
||||||
link_dir("share", **options) do |relative_path|
|
link_dir("share", **options) do |relative_path|
|
||||||
case relative_path.to_s
|
case relative_path.to_s
|
||||||
when "locale/locale.alias" then :skip_file
|
|
||||||
when INFOFILE_RX then :info
|
when INFOFILE_RX then :info
|
||||||
when LOCALEDIR_RX then :mkpath
|
when "locale/locale.alias",
|
||||||
when %r{^icons/.*/icon-theme\.cache$} then :skip_file
|
%r{^icons/.*/icon-theme\.cache$}
|
||||||
# all icons subfolders should also mkpath
|
:skip_file
|
||||||
when %r{^icons/} then :mkpath
|
when LOCALEDIR_RX,
|
||||||
when /^zsh/ then :mkpath
|
%r{^icons/}, # all icons subfolders should also mkpath
|
||||||
when /^fish/ then :mkpath
|
/^zsh/,
|
||||||
# Lua, Lua51, Lua53 all need the same handling.
|
/^fish/,
|
||||||
when %r{^lua/} then :mkpath
|
%r{^lua/}, # Lua, Lua51, Lua53 all need the same handling.
|
||||||
when %r{^guile/} then :mkpath
|
%r{^guile/},
|
||||||
when *SHARE_PATHS then :mkpath
|
*SHARE_PATHS
|
||||||
else :link
|
:mkpath
|
||||||
|
else
|
||||||
|
:link
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
link_dir("lib", **options) do |relative_path|
|
link_dir("lib", **options) do |relative_path|
|
||||||
case relative_path.to_s
|
case relative_path.to_s
|
||||||
when "charset.alias" then :skip_file
|
when "charset.alias"
|
||||||
# pkg-config database gets explicitly created
|
:skip_file
|
||||||
when "pkgconfig" then :mkpath
|
when "pkgconfig", # pkg-config database gets explicitly created
|
||||||
# cmake database gets explicitly created
|
"cmake", # cmake database gets explicitly created
|
||||||
when "cmake" then :mkpath
|
"dtrace", # lib/language folders also get explicitly created
|
||||||
# lib/language folders also get explicitly created
|
/^gdk-pixbuf/,
|
||||||
when "dtrace" then :mkpath
|
"ghc",
|
||||||
when /^gdk-pixbuf/ then :mkpath
|
/^gio/,
|
||||||
when "ghc" then :mkpath
|
"lua",
|
||||||
when /^gio/ then :mkpath
|
/^mecab/,
|
||||||
when "lua" then :mkpath
|
/^node/,
|
||||||
when /^mecab/ then :mkpath
|
/^ocaml/,
|
||||||
when /^node/ then :mkpath
|
/^perl5/,
|
||||||
when /^ocaml/ then :mkpath
|
"php",
|
||||||
when /^perl5/ then :mkpath
|
/^python[23]\.\d/,
|
||||||
when "php" then :mkpath
|
/^R/,
|
||||||
when /^python[23]\.\d/ then :mkpath
|
/^ruby/
|
||||||
when /^R/ then :mkpath
|
:mkpath
|
||||||
when /^ruby/ then :mkpath
|
else
|
||||||
# Everything else is symlinked to the cellar
|
# Everything else is symlinked to the cellar
|
||||||
else :link
|
:link
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -189,21 +189,19 @@ module OS
|
|||||||
# installed CLT version. This is useful as they are packaged
|
# installed CLT version. This is useful as they are packaged
|
||||||
# simultaneously so workarounds need to apply to both based on their
|
# simultaneously so workarounds need to apply to both based on their
|
||||||
# comparable version.
|
# comparable version.
|
||||||
latest_stable = "12.0"
|
|
||||||
case (DevelopmentTools.clang_version.to_f * 10).to_i
|
case (DevelopmentTools.clang_version.to_f * 10).to_i
|
||||||
when 120 then latest_stable
|
|
||||||
when 110 then "11.5"
|
|
||||||
when 100 then "10.3"
|
|
||||||
when 91 then "9.4"
|
|
||||||
when 90 then "9.2"
|
|
||||||
when 81 then "8.3"
|
|
||||||
when 80 then "8.0"
|
|
||||||
when 73 then "7.3"
|
|
||||||
when 70 then "7.0"
|
|
||||||
when 61 then "6.1"
|
|
||||||
when 60 then "6.0"
|
|
||||||
when 0 then "dunno"
|
when 0 then "dunno"
|
||||||
else latest_stable
|
when 60 then "6.0"
|
||||||
|
when 61 then "6.1"
|
||||||
|
when 70 then "7.0"
|
||||||
|
when 73 then "7.3"
|
||||||
|
when 80 then "8.0"
|
||||||
|
when 81 then "8.3"
|
||||||
|
when 90 then "9.2"
|
||||||
|
when 91 then "9.4"
|
||||||
|
when 100 then "10.3"
|
||||||
|
when 110 then "11.5"
|
||||||
|
else "12.0"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -277,8 +275,7 @@ module OS
|
|||||||
sig { returns(String) }
|
sig { returns(String) }
|
||||||
def latest_clang_version
|
def latest_clang_version
|
||||||
case MacOS.version
|
case MacOS.version
|
||||||
when "11.0" then "1200.0.32.27"
|
when "11.0", "10.15" then "1200.0.32.27"
|
||||||
when "10.15" then "1200.0.32.27"
|
|
||||||
when "10.14" then "1100.0.33.17"
|
when "10.14" then "1100.0.33.17"
|
||||||
when "10.13" then "1000.10.44.2"
|
when "10.13" then "1000.10.44.2"
|
||||||
when "10.12" then "900.0.39.2"
|
when "10.12" then "900.0.39.2"
|
||||||
|
|||||||
@ -23,16 +23,6 @@ module RuboCop
|
|||||||
end
|
end
|
||||||
|
|
||||||
case homepage
|
case homepage
|
||||||
# Check for http:// GitHub homepage URLs, https:// is preferred.
|
|
||||||
# Note: only check homepages that are repo pages, not *.github.com hosts
|
|
||||||
when %r{^http://github.com/}
|
|
||||||
problem "Please use https:// for #{homepage}"
|
|
||||||
|
|
||||||
# Savannah has full SSL/TLS support but no auto-redirect.
|
|
||||||
# Doesn't apply to the download URLs, only the homepage.
|
|
||||||
when %r{^http://savannah.nongnu.org/}
|
|
||||||
problem "Please use https:// for #{homepage}"
|
|
||||||
|
|
||||||
# Freedesktop is complicated to handle - It has SSL/TLS, but only on certain subdomains.
|
# Freedesktop is complicated to handle - It has SSL/TLS, but only on certain subdomains.
|
||||||
# To enable https Freedesktop change the URL from http://project.freedesktop.org/wiki to
|
# To enable https Freedesktop change the URL from http://project.freedesktop.org/wiki to
|
||||||
# https://wiki.freedesktop.org/project_name.
|
# https://wiki.freedesktop.org/project_name.
|
||||||
@ -48,14 +38,6 @@ module RuboCop
|
|||||||
when %r{^https?://code\.google\.com/p/[^/]+[^/]$}
|
when %r{^https?://code\.google\.com/p/[^/]+[^/]$}
|
||||||
problem "#{homepage} should end with a slash"
|
problem "#{homepage} should end with a slash"
|
||||||
|
|
||||||
# People will run into mixed content sometimes, but we should enforce and then add
|
|
||||||
# exemptions as they are discovered. Treat mixed content on homepages as a bug.
|
|
||||||
# Justify each exemptions with a code comment so we can keep track here.
|
|
||||||
|
|
||||||
when %r{^http://[^/]*\.github\.io/},
|
|
||||||
%r{^http://[^/]*\.sourceforge\.io/}
|
|
||||||
problem "Please use https:// for #{homepage}"
|
|
||||||
|
|
||||||
when %r{^http://([^/]*)\.(sf|sourceforge)\.net(/|$)}
|
when %r{^http://([^/]*)\.(sf|sourceforge)\.net(/|$)}
|
||||||
problem "#{homepage} should be `https://#{Regexp.last_match(1)}.sourceforge.io/`"
|
problem "#{homepage} should be `https://#{Regexp.last_match(1)}.sourceforge.io/`"
|
||||||
|
|
||||||
@ -67,15 +49,28 @@ module RuboCop
|
|||||||
offending_node(parameters(homepage_node).first)
|
offending_node(parameters(homepage_node).first)
|
||||||
problem "GitHub homepages (`#{homepage}`) should not end with .git"
|
problem "GitHub homepages (`#{homepage}`) should not end with .git"
|
||||||
|
|
||||||
|
# People will run into mixed content sometimes, but we should enforce and then add
|
||||||
|
# exemptions as they are discovered. Treat mixed content on homepages as a bug.
|
||||||
|
# Justify each exemptions with a code comment so we can keep track here.
|
||||||
|
#
|
||||||
|
# Compact the above into this list as we're able to remove detailed notations, etc over time.
|
||||||
|
when
|
||||||
|
# Check for http:// GitHub homepage URLs, https:// is preferred.
|
||||||
|
# Note: only check homepages that are repo pages, not *.github.com hosts
|
||||||
|
%r{^http://github.com/},
|
||||||
|
%r{^http://[^/]*\.github\.io/},
|
||||||
|
|
||||||
|
# Savannah has full SSL/TLS support but no auto-redirect.
|
||||||
|
# Doesn't apply to the download URLs, only the homepage.
|
||||||
|
%r{^http://savannah.nongnu.org/},
|
||||||
|
|
||||||
|
%r{^http://[^/]*\.sourceforge\.io/},
|
||||||
# There's an auto-redirect here, but this mistake is incredibly common too.
|
# There's an auto-redirect here, but this mistake is incredibly common too.
|
||||||
# Only applies to the homepage and subdomains for now, not the FTP URLs.
|
# Only applies to the homepage and subdomains for now, not the FTP URLs.
|
||||||
when %r{^http://((?:build|cloud|developer|download|extensions|git|
|
%r{^http://((?:build|cloud|developer|download|extensions|git|
|
||||||
glade|help|library|live|nagios|news|people|
|
glade|help|library|live|nagios|news|people|
|
||||||
projects|rt|static|wiki|www)\.)?gnome\.org}x
|
projects|rt|static|wiki|www)\.)?gnome\.org}x,
|
||||||
problem "Please use https:// for #{homepage}"
|
%r{^http://[^/]*\.apache\.org},
|
||||||
|
|
||||||
# Compact the above into this list as we're able to remove detailed notations, etc over time.
|
|
||||||
when %r{^http://[^/]*\.apache\.org},
|
|
||||||
%r{^http://packages\.debian\.org},
|
%r{^http://packages\.debian\.org},
|
||||||
%r{^http://wiki\.freedesktop\.org/},
|
%r{^http://wiki\.freedesktop\.org/},
|
||||||
%r{^http://((?:www)\.)?gnupg\.org/},
|
%r{^http://((?:www)\.)?gnupg\.org/},
|
||||||
|
|||||||
@ -151,7 +151,7 @@ RSpec.shared_context "integration test" do
|
|||||||
|
|
||||||
# something here
|
# something here
|
||||||
RUBY
|
RUBY
|
||||||
when "foo"
|
when "foo", "patchelf"
|
||||||
content = <<~RUBY
|
content = <<~RUBY
|
||||||
url "https://brew.sh/#{name}-1.0"
|
url "https://brew.sh/#{name}-1.0"
|
||||||
RUBY
|
RUBY
|
||||||
@ -160,11 +160,6 @@ RSpec.shared_context "integration test" do
|
|||||||
url "https://brew.sh/#{name}-1.0"
|
url "https://brew.sh/#{name}-1.0"
|
||||||
depends_on "foo"
|
depends_on "foo"
|
||||||
RUBY
|
RUBY
|
||||||
when "patchelf"
|
|
||||||
content = <<~RUBY
|
|
||||||
url "https://brew.sh/#{name}-1.0"
|
|
||||||
RUBY
|
|
||||||
|
|
||||||
when "package_license"
|
when "package_license"
|
||||||
content = <<~RUBY
|
content = <<~RUBY
|
||||||
url "https://brew.sh/#patchelf-1.0"
|
url "https://brew.sh/#patchelf-1.0"
|
||||||
|
|||||||
@ -73,7 +73,7 @@ describe Utils::Shell do
|
|||||||
specify "::csh_quote" do
|
specify "::csh_quote" do
|
||||||
expect(subject.send(:csh_quote, "")).to eq("''")
|
expect(subject.send(:csh_quote, "")).to eq("''")
|
||||||
expect(subject.send(:csh_quote, "\\")).to eq("\\\\")
|
expect(subject.send(:csh_quote, "\\")).to eq("\\\\")
|
||||||
# note this test is different than for sh
|
# NOTE: this test is different than for sh
|
||||||
expect(subject.send(:csh_quote, "\n")).to eq("'\\\n'")
|
expect(subject.send(:csh_quote, "\n")).to eq("'\\\n'")
|
||||||
expect(subject.send(:csh_quote, "$")).to eq("\\$")
|
expect(subject.send(:csh_quote, "$")).to eq("\\$")
|
||||||
expect(subject.send(:csh_quote, "word")).to eq("word")
|
expect(subject.send(:csh_quote, "word")).to eq("word")
|
||||||
|
|||||||
@ -103,14 +103,12 @@ module Homebrew
|
|||||||
# We already attempted to upgrade f as part of the dependency tree of
|
# We already attempted to upgrade f as part of the dependency tree of
|
||||||
# another formula. In that case, don't generate an error, just move on.
|
# another formula. In that case, don't generate an error, just move on.
|
||||||
nil
|
nil
|
||||||
rescue CannotInstallFormulaError => e
|
rescue CannotInstallFormulaError, DownloadError => e
|
||||||
ofail e
|
ofail e
|
||||||
rescue BuildError => e
|
rescue BuildError => e
|
||||||
e.dump(verbose: args.verbose?)
|
e.dump(verbose: args.verbose?)
|
||||||
puts
|
puts
|
||||||
Homebrew.failed = true
|
Homebrew.failed = true
|
||||||
rescue DownloadError => e
|
|
||||||
ofail e
|
|
||||||
ensure
|
ensure
|
||||||
# restore previous installation state if build failed
|
# restore previous installation state if build failed
|
||||||
begin
|
begin
|
||||||
@ -241,14 +239,12 @@ module Homebrew
|
|||||||
# We already attempted to reinstall f as part of the dependency tree of
|
# We already attempted to reinstall f as part of the dependency tree of
|
||||||
# another formula. In that case, don't generate an error, just move on.
|
# another formula. In that case, don't generate an error, just move on.
|
||||||
nil
|
nil
|
||||||
rescue CannotInstallFormulaError => e
|
rescue CannotInstallFormulaError, DownloadError => e
|
||||||
ofail e
|
ofail e
|
||||||
rescue BuildError => e
|
rescue BuildError => e
|
||||||
e.dump(verbose: args.verbose?)
|
e.dump(verbose: args.verbose?)
|
||||||
puts
|
puts
|
||||||
Homebrew.failed = true
|
Homebrew.failed = true
|
||||||
rescue DownloadError => e
|
|
||||||
ofail e
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib"
|
|||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.1.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.1.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.7.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.2.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.3.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.8.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.8.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.0.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.0.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-sorbet-0.5.1/lib"
|
||||||
|
|||||||
@ -516,13 +516,11 @@ class Version
|
|||||||
l += 1
|
l += 1
|
||||||
r += 1
|
r += 1
|
||||||
next
|
next
|
||||||
elsif a.numeric? && b.numeric?
|
elsif a.numeric? && !b.numeric?
|
||||||
return a <=> b
|
|
||||||
elsif a.numeric?
|
|
||||||
return 1 if a > NULL_TOKEN
|
return 1 if a > NULL_TOKEN
|
||||||
|
|
||||||
l += 1
|
l += 1
|
||||||
elsif b.numeric?
|
elsif !a.numeric? && b.numeric?
|
||||||
return -1 if b > NULL_TOKEN
|
return -1 if b > NULL_TOKEN
|
||||||
|
|
||||||
r += 1
|
r += 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user