diff --git a/Library/Homebrew/cask/dsl/depends_on.rb b/Library/Homebrew/cask/dsl/depends_on.rb index 8e2280459a..8009749896 100644 --- a/Library/Homebrew/cask/dsl/depends_on.rb +++ b/Library/Homebrew/cask/dsl/depends_on.rb @@ -64,7 +64,7 @@ module Cask MacOSRequirement.new([version.to_sym], comparator: comparator) elsif /^\s*(?<|>|[=<>]=)\s*(?\S+)\s*$/ =~ args.first MacOSRequirement.new([version], comparator: comparator) - else + else # rubocop:disable Lint/DuplicateBranch MacOSRequirement.new([args.first], comparator: "==") end rescue MacOSVersionError => e diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index b940b0d934..8ea244534f 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -450,7 +450,7 @@ module Homebrew "any" elsif cellars.include?("any_skip_relocation") "any_skip_relocation" - else + else # rubocop:disable Lint/DuplicateBranch second end else diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index a2c833655b..d4aa31ee6b 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -189,6 +189,7 @@ module OS # installed CLT version. This is useful as they are packaged # simultaneously so workarounds need to apply to both based on their # comparable version. + # rubocop:disable Lint/DuplicateBranch latest_stable = "12.0" case (DevelopmentTools.clang_version.to_f * 10).to_i when 120 then latest_stable @@ -205,6 +206,7 @@ module OS when 0 then "dunno" else latest_stable end + # rubocop:enable Lint/DuplicateBranch end def default_prefix? @@ -274,6 +276,7 @@ module OS # Bump these when the new version is distributed through Software Update # and our CI systems have been updated. + # rubocop:disable Lint/DuplicateBranch sig { returns(String) } def latest_clang_version case MacOS.version @@ -287,6 +290,7 @@ module OS else "600.0.57" end end + # rubocop:enable Lint/DuplicateBranch # 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 diff --git a/Library/Homebrew/rubocops/homepage.rb b/Library/Homebrew/rubocops/homepage.rb index c8f802a2c1..d5b37d91b3 100644 --- a/Library/Homebrew/rubocops/homepage.rb +++ b/Library/Homebrew/rubocops/homepage.rb @@ -22,6 +22,7 @@ module RuboCop problem "The homepage should start with http or https (URL is #{homepage})." end + # rubocop:disable Lint/DuplicateBranch case homepage # Check for http:// GitHub homepage URLs, https:// is preferred. # Note: only check homepages that are repo pages, not *.github.com hosts @@ -88,6 +89,7 @@ module RuboCop %r{^http://(?:[^/]*\.)?archive\.org} problem "Please use https:// for #{homepage}" end + # rubocop:enable Lint/DuplicateBranch end def autocorrect(node)