diff --git a/lib/rubocop/cop/sorbet/sigils/has_sigil.rb b/lib/rubocop/cop/sorbet/sigils/has_sigil.rb index e31c2108..2c6173ee 100644 --- a/lib/rubocop/cop/sorbet/sigils/has_sigil.rb +++ b/lib/rubocop/cop/sorbet/sigils/has_sigil.rb @@ -15,7 +15,7 @@ module Sorbet # # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. class HasSigil < ValidSigil - @registry = Cop.registry # So we can properly subclass this cop + @registry = Registry.global # So we can properly subclass this cop def require_sigil_on_all_files? true diff --git a/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb b/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb index 8b1aa59f..dfcad7fc 100644 --- a/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb +++ b/lib/rubocop/cop/sorbet/sigils/valid_sigil.rb @@ -18,7 +18,7 @@ module Sorbet # If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. # Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. class ValidSigil < RuboCop::Cop::Cop # rubocop:todo InternalAffairs/InheritDeprecatedCopClass - @registry = Cop.registry # So we can properly subclass this cop + @registry = Registry.global # So we can properly subclass this cop def investigate(processed_source) return if processed_source.tokens.empty? diff --git a/tasks/cops_documentation.rake b/tasks/cops_documentation.rake index fc338a05..1fb63bdf 100644 --- a/tasks/cops_documentation.rake +++ b/tasks/cops_documentation.rake @@ -278,7 +278,7 @@ task generate_cops_documentation: :yard_for_generate_documentation do end def main - cops = RuboCop::Cop::Cop.registry + cops = RuboCop::Cop::Registry.global config = RuboCop::ConfigLoader.load_file("config/default.yml") YARD::Registry.load! @@ -302,7 +302,7 @@ task documentation_syntax_check: :yard_for_generate_documentation do ok = true YARD::Registry.load! - cops = RuboCop::Cop::Cop.registry + cops = RuboCop::Cop::Registry.global cops.each do |cop| examples = YARD::Registry.all(:class).find do |code_object| next unless RuboCop::Cop::Badge.for(code_object.to_s) == cop.badge