From c0fd4b069f524a548a405e26503cfbc30c05c4d6 Mon Sep 17 00:00:00 2001 From: John Bolliger Date: Wed, 26 Aug 2026 22:50:53 -0600 Subject: [PATCH] fix rubocop config so CI does not scan vendored gems The CI rubocop job failed with: Error: The `Style/MethodMissingSuper` cop has been removed since it has been superseded by `Lint/MissingSuper`. (obsolete configuration found in vendor/bundle/ruby/3.4.0/gems/protobuf-3.10.9/.rubocop_todo.yml) An `Exclude` key under `AllCops` replaces the default exclude list rather than adding to it. The default list contains `vendor/**/*`. Setting only `gemfiles/**/*` dropped that entry, so rubocop walked into `vendor/bundle`, found the `.rubocop.yml` of each installed gem, and inherited it. The protobuf gem pins a cop that rubocop 1.90 removed. `inherit_mode: merge: [Exclude]` keeps the defaults and adds `gemfiles/**/*` to them. The rubocop job installs gems into `vendor/bundle`, so this only appeared in CI. Also set `NewCops: disable`. That silences the pending cop list that made up the rest of the failure output. Enabling the new cops instead adds several hundred offenses, including cops that conflict with the deliberate `::` constant prefix style used throughout this gem. Co-Authored-By: Claude Opus 5 (1M context) --- .rubocop.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 28eacc6..9a995b5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,14 @@ AllCops: TargetRubyVersion: 3.1 + # Do not adopt new cops automatically. Without this, every run prints the + # full pending cop list as a warning. + NewCops: disable + # Keep the default Exclude list. Without this, the Exclude below replaces the + # defaults, and RuboCop walks into vendor/bundle and reads the .rubocop.yml of + # every installed gem. Some of those name cops that no longer exist. + inherit_mode: + merge: + - Exclude Exclude: - 'gemfiles/**/*'