From 791ca27896148a18d603d696f0dccbd3eb493786 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sun, 4 Feb 2024 12:58:34 -0800 Subject: [PATCH] Add rubocop exclusion --- Library/.rubocop.yml | 1 + Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index b024cb4dc3..51c67f9f03 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -68,6 +68,7 @@ Homebrew/NegateInclude: # `exclude?` is not available here: - "Homebrew/standalone/init.rb" - "Homebrew/rubocops/**/*" + - "Homebrew/sorbet/tapioca/**/*" # `system` is a special case and aligns on second argument, so allow this for formulae. Layout/ArgumentAlignment: diff --git a/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb b/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb index d0f6d0d0e1..d1c1b5934a 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb @@ -3,7 +3,6 @@ require "method_source" require "rubocop" -require_relative "../../../extend/string" # placate rubocop require_relative "../../../rubocops" module Tapioca @@ -23,7 +22,7 @@ module Tapioca path = T.must(Object.const_source_location(klass.to_s)).fetch(0).to_s # exclude vendored code, to avoid contradicting their RBI files - path.exclude?("/vendor/bundle/ruby/") && + !path.include?("/vendor/bundle/ruby/") && # exclude source code that already has an RBI file !Pathname("#{path}i").exist? && # exclude source code that doesn't use the DSLs