Update rubocop to version 1.72.2 and use plugins configuration style (#33946)
				
					
				
			This commit is contained in:
		@@ -26,9 +26,11 @@ inherit_mode:
 | 
				
			|||||||
  merge:
 | 
					  merge:
 | 
				
			||||||
    - Exclude
 | 
					    - Exclude
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require:
 | 
					plugins:
 | 
				
			||||||
  - rubocop-rails
 | 
					  - rubocop-rails
 | 
				
			||||||
  - rubocop-rspec
 | 
					  - rubocop-rspec
 | 
				
			||||||
  - rubocop-rspec_rails
 | 
					 | 
				
			||||||
  - rubocop-performance
 | 
					  - rubocop-performance
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					require:
 | 
				
			||||||
 | 
					  - rubocop-rspec_rails
 | 
				
			||||||
  - rubocop-capybara
 | 
					  - rubocop-capybara
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,9 @@
 | 
				
			|||||||
Rails/BulkChangeTable:
 | 
					Rails/BulkChangeTable:
 | 
				
			||||||
  Enabled: false # Conflicts with strong_migrations features
 | 
					  Enabled: false # Conflicts with strong_migrations features
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Rails/Delegate:
 | 
				
			||||||
 | 
					  Enabled: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Rails/FilePath:
 | 
					Rails/FilePath:
 | 
				
			||||||
  EnforcedStyle: arguments
 | 
					  EnforcedStyle: arguments
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# This configuration was generated by
 | 
					# This configuration was generated by
 | 
				
			||||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
 | 
					# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
 | 
				
			||||||
# using RuboCop version 1.70.0.
 | 
					# using RuboCop version 1.72.2.
 | 
				
			||||||
# The point is for the user to remove these configuration records
 | 
					# The point is for the user to remove these configuration records
 | 
				
			||||||
# one by one as the offenses are removed from the code base.
 | 
					# one by one as the offenses are removed from the code base.
 | 
				
			||||||
# Note that changes in the inspected code, or installation of new
 | 
					# Note that changes in the inspected code, or installation of new
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								Gemfile.lock
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								Gemfile.lock
									
									
									
									
									
								
							@@ -383,10 +383,11 @@ GEM
 | 
				
			|||||||
      railties (>= 6.1)
 | 
					      railties (>= 6.1)
 | 
				
			||||||
      rexml
 | 
					      rexml
 | 
				
			||||||
    link_header (0.0.8)
 | 
					    link_header (0.0.8)
 | 
				
			||||||
 | 
					    lint_roller (1.1.0)
 | 
				
			||||||
    llhttp-ffi (0.5.0)
 | 
					    llhttp-ffi (0.5.0)
 | 
				
			||||||
      ffi-compiler (~> 1.0)
 | 
					      ffi-compiler (~> 1.0)
 | 
				
			||||||
      rake (~> 13.0)
 | 
					      rake (~> 13.0)
 | 
				
			||||||
    logger (1.6.5)
 | 
					    logger (1.6.6)
 | 
				
			||||||
    lograge (0.14.0)
 | 
					    lograge (0.14.0)
 | 
				
			||||||
      actionpack (>= 4)
 | 
					      actionpack (>= 4)
 | 
				
			||||||
      activesupport (>= 4)
 | 
					      activesupport (>= 4)
 | 
				
			||||||
@@ -722,9 +723,10 @@ GEM
 | 
				
			|||||||
      rspec-mocks (~> 3.0)
 | 
					      rspec-mocks (~> 3.0)
 | 
				
			||||||
      sidekiq (>= 5, < 8)
 | 
					      sidekiq (>= 5, < 8)
 | 
				
			||||||
    rspec-support (3.13.2)
 | 
					    rspec-support (3.13.2)
 | 
				
			||||||
    rubocop (1.71.2)
 | 
					    rubocop (1.72.2)
 | 
				
			||||||
      json (~> 2.3)
 | 
					      json (~> 2.3)
 | 
				
			||||||
      language_server-protocol (>= 3.17.0)
 | 
					      language_server-protocol (~> 3.17.0.2)
 | 
				
			||||||
 | 
					      lint_roller (~> 1.1.0)
 | 
				
			||||||
      parallel (~> 1.10)
 | 
					      parallel (~> 1.10)
 | 
				
			||||||
      parser (>= 3.3.0.2)
 | 
					      parser (>= 3.3.0.2)
 | 
				
			||||||
      rainbow (>= 2.2.2, < 4.0)
 | 
					      rainbow (>= 2.2.2, < 4.0)
 | 
				
			||||||
@@ -736,16 +738,19 @@ GEM
 | 
				
			|||||||
      parser (>= 3.3.1.0)
 | 
					      parser (>= 3.3.1.0)
 | 
				
			||||||
    rubocop-capybara (2.21.0)
 | 
					    rubocop-capybara (2.21.0)
 | 
				
			||||||
      rubocop (~> 1.41)
 | 
					      rubocop (~> 1.41)
 | 
				
			||||||
    rubocop-performance (1.23.1)
 | 
					    rubocop-performance (1.24.0)
 | 
				
			||||||
      rubocop (>= 1.48.1, < 2.0)
 | 
					      lint_roller (~> 1.1)
 | 
				
			||||||
      rubocop-ast (>= 1.31.1, < 2.0)
 | 
					      rubocop (>= 1.72.1, < 2.0)
 | 
				
			||||||
    rubocop-rails (2.29.1)
 | 
					      rubocop-ast (>= 1.38.0, < 2.0)
 | 
				
			||||||
 | 
					    rubocop-rails (2.30.1)
 | 
				
			||||||
      activesupport (>= 4.2.0)
 | 
					      activesupport (>= 4.2.0)
 | 
				
			||||||
 | 
					      lint_roller (~> 1.1)
 | 
				
			||||||
      rack (>= 1.1)
 | 
					      rack (>= 1.1)
 | 
				
			||||||
      rubocop (>= 1.52.0, < 2.0)
 | 
					      rubocop (>= 1.72.1, < 2.0)
 | 
				
			||||||
      rubocop-ast (>= 1.31.1, < 2.0)
 | 
					      rubocop-ast (>= 1.38.0, < 2.0)
 | 
				
			||||||
    rubocop-rspec (3.4.0)
 | 
					    rubocop-rspec (3.5.0)
 | 
				
			||||||
      rubocop (~> 1.61)
 | 
					      lint_roller (~> 1.1)
 | 
				
			||||||
 | 
					      rubocop (~> 1.72, >= 1.72.1)
 | 
				
			||||||
    rubocop-rspec_rails (2.30.0)
 | 
					    rubocop-rspec_rails (2.30.0)
 | 
				
			||||||
      rubocop (~> 1.61)
 | 
					      rubocop (~> 1.61)
 | 
				
			||||||
      rubocop-rspec (~> 3, >= 3.0.1)
 | 
					      rubocop-rspec (~> 3, >= 3.0.1)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,7 +260,7 @@ class Request
 | 
				
			|||||||
        outer_e = nil
 | 
					        outer_e = nil
 | 
				
			||||||
        port    = args.first
 | 
					        port    = args.first
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        addresses = [] # rubocop:disable Lint/UselessAssignment # TODO: https://github.com/rubocop/rubocop/issues/13395
 | 
					        addresses = [] # rubocop:disable Lint/UselessAssignment -- TODO: https://github.com/rubocop/rubocop/issues/13395
 | 
				
			||||||
        begin
 | 
					        begin
 | 
				
			||||||
          addresses = [IPAddr.new(host)]
 | 
					          addresses = [IPAddr.new(host)]
 | 
				
			||||||
        rescue IPAddr::InvalidAddressError
 | 
					        rescue IPAddr::InvalidAddressError
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,8 @@ class BackupService < BaseService
 | 
				
			|||||||
  include Payloadable
 | 
					  include Payloadable
 | 
				
			||||||
  include ContextHelper
 | 
					  include ContextHelper
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  CHUNK_SIZE = 1.megabyte
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  attr_reader :account, :backup
 | 
					  attr_reader :account, :backup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def call(backup)
 | 
					  def call(backup)
 | 
				
			||||||
@@ -181,8 +183,6 @@ class BackupService < BaseService
 | 
				
			|||||||
    ).as_json
 | 
					    ).as_json
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  CHUNK_SIZE = 1.megabyte
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  def download_to_zip(zipfile, attachment, filename)
 | 
					  def download_to_zip(zipfile, attachment, filename)
 | 
				
			||||||
    adapter = Paperclip.io_adapters.for(attachment)
 | 
					    adapter = Paperclip.io_adapters.for(attachment)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -289,6 +289,16 @@ module Mastodon::CLI
 | 
				
			|||||||
      fail_with_message 'Invalid URL'
 | 
					      fail_with_message 'Invalid URL'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    PRELOADED_MODELS = %w(
 | 
				
			||||||
 | 
					      Account
 | 
				
			||||||
 | 
					      Backup
 | 
				
			||||||
 | 
					      CustomEmoji
 | 
				
			||||||
 | 
					      Import
 | 
				
			||||||
 | 
					      MediaAttachment
 | 
				
			||||||
 | 
					      PreviewCard
 | 
				
			||||||
 | 
					      SiteUpload
 | 
				
			||||||
 | 
					    ).freeze
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private
 | 
					    private
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def object_storage_summary
 | 
					    def object_storage_summary
 | 
				
			||||||
@@ -310,16 +320,6 @@ module Mastodon::CLI
 | 
				
			|||||||
      SQL
 | 
					      SQL
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    PRELOADED_MODELS = %w(
 | 
					 | 
				
			||||||
      Account
 | 
					 | 
				
			||||||
      Backup
 | 
					 | 
				
			||||||
      CustomEmoji
 | 
					 | 
				
			||||||
      Import
 | 
					 | 
				
			||||||
      MediaAttachment
 | 
					 | 
				
			||||||
      PreviewCard
 | 
					 | 
				
			||||||
      SiteUpload
 | 
					 | 
				
			||||||
    ).freeze
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def preload_records_from_mixed_objects(objects)
 | 
					    def preload_records_from_mixed_objects(objects)
 | 
				
			||||||
      preload_map = Hash.new { |hash, key| hash[key] = [] }
 | 
					      preload_map = Hash.new { |hash, key| hash[key] = [] }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user