Enable Lint/RedundantCopDisableDirective (#23687)

pull/53/head
Nick Schonning 2023-02-17 22:30:14 -05:00 committed by GitHub
parent d65b2c1924
commit e2567df860
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 8 deletions

View File

@ -3626,7 +3626,3 @@ Style/WordArray:
- 'spec/services/activitypub/process_account_service_spec.rb' - 'spec/services/activitypub/process_account_service_spec.rb'
- 'spec/services/delete_account_service_spec.rb' - 'spec/services/delete_account_service_spec.rb'
- 'spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb' - 'spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb'
# don't clean out the manual directives overridden by generated file
Lint/RedundantCopDisableDirective:
Enabled: false

View File

@ -10,7 +10,6 @@ class InitialStateSerializer < ActiveModel::Serializer
has_one :push_subscription, serializer: REST::WebPushSubscriptionSerializer has_one :push_subscription, serializer: REST::WebPushSubscriptionSerializer
has_one :role, serializer: REST::RoleSerializer has_one :role, serializer: REST::RoleSerializer
# rubocop:disable Metrics/AbcSize
def meta def meta
store = { store = {
streaming_api_base_url: Rails.configuration.x.streaming_api_base_url, streaming_api_base_url: Rails.configuration.x.streaming_api_base_url,

View File

@ -289,8 +289,6 @@ module Mastodon
# determines this method to be too complex while there's no way to make it # determines this method to be too complex while there's no way to make it
# less "complex" without introducing extra methods (which actually will # less "complex" without introducing extra methods (which actually will
# make things _more_ complex). # make things _more_ complex).
#
# rubocop: disable Metrics/AbcSize
def update_column_in_batches(table_name, column, value) def update_column_in_batches(table_name, column, value)
if transaction_open? if transaction_open?
raise 'update_column_in_batches can not be run inside a transaction, ' \ raise 'update_column_in_batches can not be run inside a transaction, ' \
@ -573,7 +571,7 @@ module Mastodon
o.conname as name, o.conname as name,
o.confdeltype as on_delete o.confdeltype as on_delete
from pg_constraint o from pg_constraint o
left join pg_class f on f.oid = o.confrelid left join pg_class f on f.oid = o.confrelid
left join pg_class c on c.oid = o.conrelid left join pg_class c on c.oid = o.conrelid
left join pg_class m on m.oid = o.conrelid left join pg_class m on m.oid = o.conrelid
where o.contype = 'f' where o.contype = 'f'