Add rubocop exclusion

This commit is contained in:
Douglas Eichelberger 2024-02-04 12:58:34 -08:00
parent adfec16871
commit 791ca27896
2 changed files with 2 additions and 2 deletions

View File

@ -68,6 +68,7 @@ Homebrew/NegateInclude:
# `exclude?` is not available here: # `exclude?` is not available here:
- "Homebrew/standalone/init.rb" - "Homebrew/standalone/init.rb"
- "Homebrew/rubocops/**/*" - "Homebrew/rubocops/**/*"
- "Homebrew/sorbet/tapioca/**/*"
# `system` is a special case and aligns on second argument, so allow this for formulae. # `system` is a special case and aligns on second argument, so allow this for formulae.
Layout/ArgumentAlignment: Layout/ArgumentAlignment:

View File

@ -3,7 +3,6 @@
require "method_source" require "method_source"
require "rubocop" require "rubocop"
require_relative "../../../extend/string" # placate rubocop
require_relative "../../../rubocops" require_relative "../../../rubocops"
module Tapioca module Tapioca
@ -23,7 +22,7 @@ module Tapioca
path = T.must(Object.const_source_location(klass.to_s)).fetch(0).to_s path = T.must(Object.const_source_location(klass.to_s)).fetch(0).to_s
# exclude vendored code, to avoid contradicting their RBI files # 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 # exclude source code that already has an RBI file
!Pathname("#{path}i").exist? && !Pathname("#{path}i").exist? &&
# exclude source code that doesn't use the DSLs # exclude source code that doesn't use the DSLs