Autofix Rubocop RSpec/ImplicitSubject (#23721)

This commit is contained in:
Nick Schonning
2023-02-19 23:00:48 -05:00
committed by GitHub
parent 63e6353886
commit 38a1d8bb85
26 changed files with 184 additions and 221 deletions

View File

@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit`
# on 2023-02-16 05:53:07 UTC using RuboCop version 1.45.1.
# on 2023-02-19 06:22:09 UTC using RuboCop version 1.45.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@ -162,7 +162,7 @@ Layout/HashAlignment:
- 'spec/models/admin/account_action_spec.rb'
- 'spec/models/concerns/account_interactions_spec.rb'
# Offense count: 577
# Offense count: 581
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
@ -305,18 +305,17 @@ Lint/Void:
Exclude:
- 'spec/services/resolve_account_service_spec.rb'
# Offense count: 65
# Offense count: 66
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Enabled: false
# Offense count: 11
# Offense count: 10
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Exclude:
- 'app/models/concerns/account_interactions.rb'
- 'app/models/concerns/omniauthable.rb'
- 'db/post_migrate/20221101190723_backfill_admin_action_logs.rb'
- 'db/post_migrate/20221206114142_backfill_admin_action_logs_again.rb'
- 'lib/tasks/branding.rake'
@ -335,7 +334,7 @@ Metrics/BlockNesting:
Metrics/CyclomaticComplexity:
Enabled: false
# Offense count: 40
# Offense count: 35
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Enabled: false
@ -936,37 +935,6 @@ RSpec/HookArgument:
- 'spec/services/import_service_spec.rb'
- 'spec/spec_helper.rb'
# Offense count: 159
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: single_line_only, single_statement_only, disallow, require_implicit
RSpec/ImplicitSubject:
Exclude:
- 'spec/controllers/admin/accounts_controller_spec.rb'
- 'spec/controllers/admin/instances_controller_spec.rb'
- 'spec/controllers/application_controller_spec.rb'
- 'spec/controllers/home_controller_spec.rb'
- 'spec/controllers/relationships_controller_spec.rb'
- 'spec/controllers/settings/featured_tags_controller_spec.rb'
- 'spec/controllers/settings/migrations_controller_spec.rb'
- 'spec/controllers/settings/sessions_controller_spec.rb'
- 'spec/features/log_in_spec.rb'
- 'spec/features/profile_spec.rb'
- 'spec/lib/emoji_formatter_spec.rb'
- 'spec/lib/entity_cache_spec.rb'
- 'spec/lib/html_aware_formatter_spec.rb'
- 'spec/lib/ostatus/tag_manager_spec.rb'
- 'spec/lib/plain_text_formatter_spec.rb'
- 'spec/lib/text_formatter_spec.rb'
- 'spec/models/concerns/account_interactions_spec.rb'
- 'spec/models/custom_emoji_spec.rb'
- 'spec/models/media_attachment_spec.rb'
- 'spec/models/notification_spec.rb'
- 'spec/models/remote_follow_spec.rb'
- 'spec/models/report_spec.rb'
- 'spec/models/session_activation_spec.rb'
- 'spec/models/setting_spec.rb'
# Offense count: 101
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
@ -1199,7 +1167,7 @@ RSpec/MissingExampleGroupArgument:
RSpec/MultipleExpectations:
Max: 19
# Offense count: 443
# Offense count: 442
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 21
@ -1216,7 +1184,7 @@ RSpec/MultipleSubjects:
- 'spec/controllers/follower_accounts_controller_spec.rb'
- 'spec/controllers/following_accounts_controller_spec.rb'
# Offense count: 1252
# Offense count: 1407
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
@ -1226,6 +1194,7 @@ RSpec/NamedSubject:
- 'spec/controllers/admin/confirmations_controller_spec.rb'
- 'spec/controllers/admin/custom_emojis_controller_spec.rb'
- 'spec/controllers/admin/domain_blocks_controller_spec.rb'
- 'spec/controllers/admin/instances_controller_spec.rb'
- 'spec/controllers/admin/invites_controller_spec.rb'
- 'spec/controllers/admin/report_notes_controller_spec.rb'
- 'spec/controllers/api/v1/accounts/notes_controller_spec.rb'
@ -1233,13 +1202,18 @@ RSpec/NamedSubject:
- 'spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb'
- 'spec/controllers/auth/passwords_controller_spec.rb'
- 'spec/controllers/auth/registrations_controller_spec.rb'
- 'spec/controllers/home_controller_spec.rb'
- 'spec/controllers/invites_controller_spec.rb'
- 'spec/controllers/oauth/authorizations_controller_spec.rb'
- 'spec/controllers/oauth/authorized_applications_controller_spec.rb'
- 'spec/controllers/relationships_controller_spec.rb'
- 'spec/controllers/settings/featured_tags_controller_spec.rb'
- 'spec/controllers/settings/migrations_controller_spec.rb'
- 'spec/controllers/settings/sessions_controller_spec.rb'
- 'spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb'
- 'spec/controllers/well_known/webfinger_controller_spec.rb'
- 'spec/features/log_in_spec.rb'
- 'spec/features/profile_spec.rb'
- 'spec/lib/activitypub/activity/accept_spec.rb'
- 'spec/lib/activitypub/activity/add_spec.rb'
- 'spec/lib/activitypub/activity/announce_spec.rb'
@ -1262,16 +1236,21 @@ RSpec/NamedSubject:
- 'spec/lib/connection_pool/shared_timed_stack_spec.rb'
- 'spec/lib/delivery_failure_tracker_spec.rb'
- 'spec/lib/emoji_formatter_spec.rb'
- 'spec/lib/entity_cache_spec.rb'
- 'spec/lib/fast_ip_map_spec.rb'
- 'spec/lib/feed_manager_spec.rb'
- 'spec/lib/hashtag_normalizer_spec.rb'
- 'spec/lib/html_aware_formatter_spec.rb'
- 'spec/lib/link_details_extractor_spec.rb'
- 'spec/lib/ostatus/tag_manager_spec.rb'
- 'spec/lib/plain_text_formatter_spec.rb'
- 'spec/lib/request_pool_spec.rb'
- 'spec/lib/request_spec.rb'
- 'spec/lib/sanitize_config_spec.rb'
- 'spec/lib/status_finder_spec.rb'
- 'spec/lib/status_reach_finder_spec.rb'
- 'spec/lib/suspicious_sign_in_detector_spec.rb'
- 'spec/lib/text_formatter_spec.rb'
- 'spec/lib/vacuum/access_tokens_vacuum_spec.rb'
- 'spec/lib/vacuum/backups_vacuum_spec.rb'
- 'spec/lib/vacuum/feeds_vacuum_spec.rb'
@ -1288,11 +1267,17 @@ RSpec/NamedSubject:
- 'spec/models/canonical_email_block_spec.rb'
- 'spec/models/concerns/account_interactions_spec.rb'
- 'spec/models/custom_emoji_filter_spec.rb'
- 'spec/models/custom_emoji_spec.rb'
- 'spec/models/follow_spec.rb'
- 'spec/models/home_feed_spec.rb'
- 'spec/models/media_attachment_spec.rb'
- 'spec/models/notification_spec.rb'
- 'spec/models/public_feed_spec.rb'
- 'spec/models/relationship_filter_spec.rb'
- 'spec/models/remote_follow_spec.rb'
- 'spec/models/report_spec.rb'
- 'spec/models/session_activation_spec.rb'
- 'spec/models/setting_spec.rb'
- 'spec/models/status_spec.rb'
- 'spec/models/tag_spec.rb'
- 'spec/models/trends/statuses_spec.rb'
@ -2347,46 +2332,25 @@ Style/FormatStringToken:
Style/FrozenStringLiteralComment:
Enabled: false
# Offense count: 69
# Offense count: 34
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
Style/GuardClause:
Exclude:
- 'app/controllers/admin/confirmations_controller.rb'
- 'app/controllers/admin/domain_blocks_controller.rb'
- 'app/controllers/api/v1/accounts/follower_accounts_controller.rb'
- 'app/controllers/api/v1/accounts/following_accounts_controller.rb'
- 'app/controllers/api/v1/accounts/statuses_controller.rb'
- 'app/controllers/api/v1/blocks_controller.rb'
- 'app/controllers/api/v1/conversations_controller.rb'
- 'app/controllers/api/v1/domain_blocks_controller.rb'
- 'app/controllers/api/v1/endorsements_controller.rb'
- 'app/controllers/api/v1/favourites_controller.rb'
- 'app/controllers/api/v1/follow_requests_controller.rb'
- 'app/controllers/api/v1/lists/accounts_controller.rb'
- 'app/controllers/api/v1/mutes_controller.rb'
- 'app/controllers/api/v1/notifications_controller.rb'
- 'app/controllers/api/v1/scheduled_statuses_controller.rb'
- 'app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb'
- 'app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb'
- 'app/controllers/auth/confirmations_controller.rb'
- 'app/controllers/auth/passwords_controller.rb'
- 'app/controllers/filters/statuses_controller.rb'
- 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
- 'app/lib/activitypub/activity/block.rb'
- 'app/lib/activitypub/linked_data_signature.rb'
- 'app/lib/connection_pool/shared_connection_pool.rb'
- 'app/lib/request.rb'
- 'app/lib/request_pool.rb'
- 'app/lib/status_finder.rb'
- 'app/lib/webfinger.rb'
- 'app/lib/webfinger_resource.rb'
- 'app/models/account_statuses_cleanup_policy.rb'
- 'app/models/concerns/account_counters.rb'
- 'app/models/concerns/ldap_authenticable.rb'
- 'app/models/tag.rb'
- 'app/models/user.rb'
- 'app/serializers/rest/instance_serializer.rb'
- 'app/services/fan_out_on_write_service.rb'
- 'app/services/post_status_service.rb'
- 'app/services/process_hashtags_service.rb'