add Lint/DuplicateBranch cop exceptions
This commit is contained in:
parent
50890ebd51
commit
20ee7e8881
@ -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
|
||||||
|
|||||||
@ -450,7 +450,7 @@ module Homebrew
|
|||||||
"any"
|
"any"
|
||||||
elsif cellars.include?("any_skip_relocation")
|
elsif cellars.include?("any_skip_relocation")
|
||||||
"any_skip_relocation"
|
"any_skip_relocation"
|
||||||
else
|
else # rubocop:disable Lint/DuplicateBranch
|
||||||
second
|
second
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@ -189,6 +189,7 @@ 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.
|
||||||
|
# rubocop:disable Lint/DuplicateBranch
|
||||||
latest_stable = "12.0"
|
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 120 then latest_stable
|
||||||
@ -205,6 +206,7 @@ module OS
|
|||||||
when 0 then "dunno"
|
when 0 then "dunno"
|
||||||
else latest_stable
|
else latest_stable
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Lint/DuplicateBranch
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_prefix?
|
def default_prefix?
|
||||||
@ -274,6 +276,7 @@ module OS
|
|||||||
|
|
||||||
# Bump these when the new version is distributed through Software Update
|
# Bump these when the new version is distributed through Software Update
|
||||||
# and our CI systems have been updated.
|
# and our CI systems have been updated.
|
||||||
|
# rubocop:disable Lint/DuplicateBranch
|
||||||
sig { returns(String) }
|
sig { returns(String) }
|
||||||
def latest_clang_version
|
def latest_clang_version
|
||||||
case MacOS.version
|
case MacOS.version
|
||||||
@ -287,6 +290,7 @@ module OS
|
|||||||
else "600.0.57"
|
else "600.0.57"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Lint/DuplicateBranch
|
||||||
|
|
||||||
# Bump these if things are badly broken (e.g. no SDK for this macOS)
|
# Bump these if things are badly broken (e.g. no SDK for this macOS)
|
||||||
# without this. Generally this will be the first stable CLT release on
|
# without this. Generally this will be the first stable CLT release on
|
||||||
|
|||||||
@ -22,6 +22,7 @@ module RuboCop
|
|||||||
problem "The homepage should start with http or https (URL is #{homepage})."
|
problem "The homepage should start with http or https (URL is #{homepage})."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rubocop:disable Lint/DuplicateBranch
|
||||||
case homepage
|
case homepage
|
||||||
# Check for http:// GitHub homepage URLs, https:// is preferred.
|
# Check for http:// GitHub homepage URLs, https:// is preferred.
|
||||||
# Note: only check homepages that are repo pages, not *.github.com hosts
|
# Note: only check homepages that are repo pages, not *.github.com hosts
|
||||||
@ -88,6 +89,7 @@ module RuboCop
|
|||||||
%r{^http://(?:[^/]*\.)?archive\.org}
|
%r{^http://(?:[^/]*\.)?archive\.org}
|
||||||
problem "Please use https:// for #{homepage}"
|
problem "Please use https:// for #{homepage}"
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Lint/DuplicateBranch
|
||||||
end
|
end
|
||||||
|
|
||||||
def autocorrect(node)
|
def autocorrect(node)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user