diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 7bdb0e3d7a491..83423d59c888e 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -372,14 +372,6 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) end end - [:mac?, :linux?].each do |method_name| - next if formula_tap != "homebrew-core" || file_path&.include?("linuxbrew") - - find_instance_method_call(body_node, "OS", method_name) do |check| - problem "Don't use #{check.source}; homebrew/core only supports macOS" - end - end - find_instance_call(body_node, "ARGV") do |_method_node| problem "Use build instead of ARGV to check options" end diff --git a/Library/Homebrew/test/rubocops/text/miscellaneous_spec.rb b/Library/Homebrew/test/rubocops/text/miscellaneous_spec.rb index 1fa1963e972a5..7482000c2d819 100644 --- a/Library/Homebrew/test/rubocops/text/miscellaneous_spec.rb +++ b/Library/Homebrew/test/rubocops/text/miscellaneous_spec.rb @@ -45,22 +45,6 @@ class Foo < Formula RUBY end - it "reports an offense when `OS.linux?` is used in homebrew/core" do - expect_offense(<<~RUBY, "/homebrew-core/") - class Foo < Formula - desc "foo" - url 'https://brew.sh/foo-1.0.tgz' - bottle do - if OS.linux? - ^^^^^^^^^ Don\'t use OS.linux?; homebrew/core only supports macOS - nil - end - sha256 "fe0679b932dd43a87fd415b609a7fbac7a069d117642ae8ebaac46ae1fb9f0b3" => :sierra - end - end - RUBY - end - it "reports an offense when a useless `fails_with :llvm` is used" do expect_offense(<<~RUBY) class Foo < Formula