@ -21,13 +21,6 @@ Layout/ArgumentAlignment:
- 'config/initializers/cors.rb'
- 'config/initializers/session_store.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, no_empty_lines
Layout/EmptyLinesAroundBlockBody:
Exclude:
- 'config/routes.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
Layout/ExtraSpacing:
@ -106,28 +99,6 @@ Lint/AmbiguousOperatorPrecedence:
Exclude:
- 'config/initializers/rack_attack.rb'
# Configuration parameters: AllowedMethods.
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
Exclude:
- 'spec/controllers/api/base_controller_spec.rb'
- 'spec/controllers/application_controller_spec.rb'
- 'spec/controllers/concerns/accountable_concern_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
- 'spec/lib/activitypub/adapter_spec.rb'
- 'spec/lib/connection_pool/shared_connection_pool_spec.rb'
- 'spec/lib/connection_pool/shared_timed_stack_spec.rb'
- 'spec/models/concerns/remotable_spec.rb'
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
Lint/DuplicateBranch:
Exclude:
- 'app/lib/permalink_redirector.rb'
- 'app/models/account_statuses_filter.rb'
- 'app/validators/email_mx_validator.rb'
- 'app/validators/vote_validator.rb'
- 'lib/mastodon/maintenance_cli.rb'
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
@ -168,11 +139,6 @@ Lint/EmptyBlock:
- 'spec/models/user_role_spec.rb'
- 'spec/models/web/setting_spec.rb'
# Configuration parameters: AllowComments.
Lint/EmptyClass:
Exclude:
- 'spec/controllers/api/base_controller_spec.rb'
Lint/NonLocalExitFromIterator:
Exclude:
- 'app/helpers/jsonld_helper.rb'
@ -228,6 +194,12 @@ Metrics/AbcSize:
Exclude:
- 'app/serializers/initial_state_serializer.rb'
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Exclude:
- 'app/models/concerns/status_safe_reblog_insert.rb'
# Configuration parameters: CountBlocks, Max.
Metrics/BlockNesting:
Exclude:
@ -305,42 +277,6 @@ Naming/VariableNumber:
- 'spec/models/user_spec.rb'
- 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
# Configuration parameters: MinSize.
Performance/CollectionLiteralInLoop:
Exclude:
- 'app/models/admin/appeal_filter.rb'
- 'app/models/admin/status_filter.rb'
- 'app/models/relationship_filter.rb'
- 'app/models/trends/preview_card_filter.rb'
- 'app/models/trends/status_filter.rb'
- 'app/presenters/status_relationships_presenter.rb'
- 'app/services/fetch_resource_service.rb'
- 'app/services/suspend_account_service.rb'
- 'app/services/unsuspend_account_service.rb'
- 'config/deploy.rb'
- 'lib/mastodon/media_cli.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/Count:
Exclude:
- 'app/lib/importer/accounts_index_importer.rb'
- 'app/lib/importer/tags_index_importer.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SafeMultiline.
Performance/DeletePrefix:
Exclude:
- 'app/controllers/authorize_interactions_controller.rb'
- 'app/controllers/concerns/signature_verification.rb'
- 'app/controllers/intents_controller.rb'
- 'app/lib/activitypub/case_transform.rb'
- 'app/lib/permalink_redirector.rb'
- 'app/lib/webfinger_resource.rb'
- 'app/services/activitypub/fetch_remote_actor_service.rb'
- 'app/services/backup_service.rb'
- 'app/services/resolve_account_service.rb'
- 'app/services/tag_search_service.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/MapCompact:
Exclude:
@ -360,46 +296,12 @@ Performance/MapCompact:
- 'db/migrate/20200407202420_migrate_unavailable_inboxes.rb'
- 'spec/presenters/status_relationships_presenter_spec.rb'
Performance/MethodObjectAsBlock:
Exclude:
- 'app/models/account_suggestions/source.rb'
- 'spec/models/export_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowRegexpMatch.
Performance/RedundantEqualityComparisonBlock:
Exclude:
- 'spec/requests/link_headers_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: MaxKeyValuePairs.
Performance/RedundantMerge:
Exclude:
- 'config/initializers/paperclip.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SafeMultiline.
Performance/StartWith:
Exclude:
- 'app/lib/extractor.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: OnlySumOrWithInitialValue.
Performance/Sum:
Exclude:
- 'app/lib/activity_tracker.rb'
- 'app/models/trends/history.rb'
- 'lib/paperclip/color_extractor.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/TimesMap:
Exclude:
- 'spec/controllers/api/v1/blocks_controller_spec.rb'
- 'spec/controllers/api/v1/mutes_controller_spec.rb'
- 'spec/lib/feed_manager_spec.rb'
- 'spec/lib/request_pool_spec.rb'
- 'spec/models/account_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/UnfreezeString:
Exclude:
@ -428,116 +330,6 @@ RSpec/AnyInstance:
- 'spec/workers/activitypub/delivery_worker_spec.rb'
- 'spec/workers/web/push_notification_worker_spec.rb'
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/config/initializers/rack_attack_spec.rb'
- 'spec/controllers/accounts_controller_spec.rb'
- 'spec/controllers/activitypub/collections_controller_spec.rb'
- 'spec/controllers/activitypub/inboxes_controller_spec.rb'
- 'spec/controllers/admin/domain_blocks_controller_spec.rb'
- 'spec/controllers/admin/reports/actions_controller_spec.rb'
- 'spec/controllers/admin/statuses_controller_spec.rb'
- 'spec/controllers/api/v1/accounts/relationships_controller_spec.rb'
- 'spec/controllers/api/v1/accounts_controller_spec.rb'
- 'spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb'
- 'spec/controllers/api/v1/emails/confirmations_controller_spec.rb'
- 'spec/controllers/api/v1/instances/activity_controller_spec.rb'
- 'spec/controllers/api/v1/instances/peers_controller_spec.rb'
- 'spec/controllers/api/v1/media_controller_spec.rb'
- 'spec/controllers/api/v2/filters_controller_spec.rb'
- 'spec/controllers/application_controller_spec.rb'
- 'spec/controllers/auth/registrations_controller_spec.rb'
- 'spec/controllers/auth/sessions_controller_spec.rb'
- 'spec/controllers/concerns/cache_concern_spec.rb'
- 'spec/controllers/concerns/challengable_concern_spec.rb'
- 'spec/controllers/concerns/localized_spec.rb'
- 'spec/controllers/concerns/rate_limit_headers_spec.rb'
- 'spec/controllers/instance_actors_controller_spec.rb'
- 'spec/controllers/settings/applications_controller_spec.rb'
- 'spec/controllers/settings/two_factor_authentication/webauthn_credentials_controller_spec.rb'
- 'spec/controllers/statuses_controller_spec.rb'
- 'spec/helpers/admin/account_moderation_notes_helper_spec.rb'
- 'spec/helpers/jsonld_helper_spec.rb'
- 'spec/helpers/routing_helper_spec.rb'
- 'spec/lib/activitypub/activity/accept_spec.rb'
- 'spec/lib/activitypub/activity/announce_spec.rb'
- 'spec/lib/activitypub/activity/create_spec.rb'
- 'spec/lib/activitypub/activity/follow_spec.rb'
- 'spec/lib/activitypub/activity/reject_spec.rb'
- 'spec/lib/advanced_text_formatter_spec.rb'
- 'spec/lib/emoji_formatter_spec.rb'
- 'spec/lib/entity_cache_spec.rb'
- 'spec/lib/feed_manager_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/scope_transformer_spec.rb'
- 'spec/lib/status_cache_hydrator_spec.rb'
- 'spec/lib/status_reach_finder_spec.rb'
- 'spec/lib/text_formatter_spec.rb'
- 'spec/models/account/field_spec.rb'
- 'spec/models/account_spec.rb'
- 'spec/models/admin/account_action_spec.rb'
- 'spec/models/concerns/account_interactions_spec.rb'
- 'spec/models/concerns/remotable_spec.rb'
- 'spec/models/custom_emoji_filter_spec.rb'
- 'spec/models/custom_emoji_spec.rb'
- 'spec/models/email_domain_block_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'
- 'spec/models/status_spec.rb'
- 'spec/models/web/push_subscription_spec.rb'
- 'spec/policies/account_moderation_note_policy_spec.rb'
- 'spec/policies/account_policy_spec.rb'
- 'spec/policies/backup_policy_spec.rb'
- 'spec/policies/custom_emoji_policy_spec.rb'
- 'spec/policies/domain_block_policy_spec.rb'
- 'spec/policies/email_domain_block_policy_spec.rb'
- 'spec/policies/instance_policy_spec.rb'
- 'spec/policies/invite_policy_spec.rb'
- 'spec/policies/relay_policy_spec.rb'
- 'spec/policies/report_note_policy_spec.rb'
- 'spec/policies/report_policy_spec.rb'
- 'spec/policies/settings_policy_spec.rb'
- 'spec/policies/tag_policy_spec.rb'
- 'spec/policies/user_policy_spec.rb'
- 'spec/presenters/account_relationships_presenter_spec.rb'
- 'spec/presenters/status_relationships_presenter_spec.rb'
- 'spec/services/account_search_service_spec.rb'
- 'spec/services/account_statuses_cleanup_service_spec.rb'
- 'spec/services/activitypub/fetch_remote_status_service_spec.rb'
- 'spec/services/activitypub/process_account_service_spec.rb'
- 'spec/services/activitypub/process_status_update_service_spec.rb'
- 'spec/services/fetch_link_card_service_spec.rb'
- 'spec/services/fetch_oembed_service_spec.rb'
- 'spec/services/fetch_remote_status_service_spec.rb'
- 'spec/services/follow_service_spec.rb'
- 'spec/services/import_service_spec.rb'
- 'spec/services/notify_service_spec.rb'
- 'spec/services/process_mentions_service_spec.rb'
- 'spec/services/reblog_service_spec.rb'
- 'spec/services/report_service_spec.rb'
- 'spec/services/resolve_account_service_spec.rb'
- 'spec/services/resolve_url_service_spec.rb'
- 'spec/services/search_service_spec.rb'
- 'spec/services/unallow_domain_service_spec.rb'
- 'spec/services/verify_link_service_spec.rb'
- 'spec/validators/disallowed_hashtags_validator_spec.rb'
- 'spec/validators/email_mx_validator_spec.rb'
- 'spec/validators/follow_limit_validator_spec.rb'
- 'spec/validators/poll_validator_spec.rb'
- 'spec/validators/status_pin_validator_spec.rb'
- 'spec/validators/unreserved_username_validator_spec.rb'
- 'spec/validators/url_validator_spec.rb'
- 'spec/workers/move_worker_spec.rb'
- 'spec/workers/scheduler/accounts_statuses_cleanup_scheduler_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle.
# SupportedStyles: described_class, explicit
@ -701,7 +493,6 @@ RSpec/InstanceVariable:
- 'spec/controllers/statuses_cleanup_controller_spec.rb'
- 'spec/models/concerns/account_finder_concern_spec.rb'
- 'spec/models/concerns/account_interactions_spec.rb'
- 'spec/models/concerns/remotable_spec.rb'
- 'spec/models/public_feed_spec.rb'
- 'spec/serializers/activitypub/note_serializer_spec.rb'
- 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
@ -709,17 +500,6 @@ RSpec/InstanceVariable:
- 'spec/services/search_service_spec.rb'
- 'spec/services/unblock_domain_service_spec.rb'
RSpec/LeakyConstantDeclaration:
Exclude:
- 'spec/controllers/api/base_controller_spec.rb'
- 'spec/controllers/application_controller_spec.rb'
- 'spec/controllers/concerns/accountable_concern_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
- 'spec/lib/activitypub/adapter_spec.rb'
- 'spec/lib/connection_pool/shared_connection_pool_spec.rb'
- 'spec/lib/connection_pool/shared_timed_stack_spec.rb'
- 'spec/models/concerns/remotable_spec.rb'
RSpec/LetSetup:
Exclude:
- 'spec/controllers/admin/accounts_controller_spec.rb'
@ -745,6 +525,7 @@ RSpec/LetSetup:
- 'spec/controllers/following_accounts_controller_spec.rb'
- 'spec/controllers/oauth/authorized_applications_controller_spec.rb'
- 'spec/controllers/oauth/tokens_controller_spec.rb'
- 'spec/controllers/settings/imports_controller_spec.rb'
- 'spec/lib/activitypub/activity/delete_spec.rb'
- 'spec/lib/vacuum/preview_cards_vacuum_spec.rb'
- 'spec/models/account_spec.rb'
@ -759,6 +540,7 @@ RSpec/LetSetup:
- 'spec/services/activitypub/process_collection_service_spec.rb'
- 'spec/services/batched_remove_status_service_spec.rb'
- 'spec/services/block_domain_service_spec.rb'
- 'spec/services/bulk_import_service_spec.rb'
- 'spec/services/delete_account_service_spec.rb'
- 'spec/services/import_service_spec.rb'
- 'spec/services/notify_service_spec.rb'
@ -831,17 +613,6 @@ RSpec/MultipleExpectations:
RSpec/MultipleMemoizedHelpers:
Max : 21
# This cop supports safe autocorrection (--autocorrect).
RSpec/MultipleSubjects:
Exclude:
- 'spec/controllers/activitypub/collections_controller_spec.rb'
- 'spec/controllers/activitypub/followers_synchronizations_controller_spec.rb'
- 'spec/controllers/activitypub/outboxes_controller_spec.rb'
- 'spec/controllers/api/web/embeds_controller_spec.rb'
- 'spec/controllers/emojis_controller_spec.rb'
- 'spec/controllers/follower_accounts_controller_spec.rb'
- 'spec/controllers/following_accounts_controller_spec.rb'
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max : 6
@ -867,181 +638,6 @@ RSpec/PredicateMatcher:
- 'spec/models/user_spec.rb'
- 'spec/services/post_status_service_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Inferences.
RSpec/Rails/InferredSpecType:
Exclude:
- 'spec/controllers/about_controller_spec.rb'
- 'spec/controllers/accounts_controller_spec.rb'
- 'spec/controllers/activitypub/collections_controller_spec.rb'
- 'spec/controllers/activitypub/followers_synchronizations_controller_spec.rb'
- 'spec/controllers/activitypub/inboxes_controller_spec.rb'
- 'spec/controllers/activitypub/outboxes_controller_spec.rb'
- 'spec/controllers/activitypub/replies_controller_spec.rb'
- 'spec/controllers/admin/account_moderation_notes_controller_spec.rb'
- 'spec/controllers/admin/accounts_controller_spec.rb'
- 'spec/controllers/admin/action_logs_controller_spec.rb'
- 'spec/controllers/admin/base_controller_spec.rb'
- 'spec/controllers/admin/change_emails_controller_spec.rb'
- 'spec/controllers/admin/confirmations_controller_spec.rb'
- 'spec/controllers/admin/dashboard_controller_spec.rb'
- 'spec/controllers/admin/disputes/appeals_controller_spec.rb'
- 'spec/controllers/admin/domain_allows_controller_spec.rb'
- 'spec/controllers/admin/domain_blocks_controller_spec.rb'
- 'spec/controllers/admin/email_domain_blocks_controller_spec.rb'
- 'spec/controllers/admin/export_domain_allows_controller_spec.rb'
- 'spec/controllers/admin/export_domain_blocks_controller_spec.rb'
- 'spec/controllers/admin/instances_controller_spec.rb'
- 'spec/controllers/admin/settings/branding_controller_spec.rb'
- 'spec/controllers/admin/tags_controller_spec.rb'
- 'spec/controllers/api/oembed_controller_spec.rb'
- 'spec/controllers/api/v1/accounts/pins_controller_spec.rb'
- 'spec/controllers/api/v1/accounts/search_controller_spec.rb'
- 'spec/controllers/api/v1/accounts_controller_spec.rb'
- 'spec/controllers/api/v1/admin/account_actions_controller_spec.rb'
- 'spec/controllers/api/v1/admin/accounts_controller_spec.rb'
- 'spec/controllers/api/v1/admin/domain_allows_controller_spec.rb'
- 'spec/controllers/api/v1/admin/domain_blocks_controller_spec.rb'
- 'spec/controllers/api/v1/admin/reports_controller_spec.rb'
- 'spec/controllers/api/v1/announcements/reactions_controller_spec.rb'
- 'spec/controllers/api/v1/announcements_controller_spec.rb'
- 'spec/controllers/api/v1/apps_controller_spec.rb'
- 'spec/controllers/api/v1/blocks_controller_spec.rb'
- 'spec/controllers/api/v1/bookmarks_controller_spec.rb'
- 'spec/controllers/api/v1/conversations_controller_spec.rb'
- 'spec/controllers/api/v1/custom_emojis_controller_spec.rb'
- 'spec/controllers/api/v1/domain_blocks_controller_spec.rb'
- 'spec/controllers/api/v1/emails/confirmations_controller_spec.rb'
- 'spec/controllers/api/v1/endorsements_controller_spec.rb'
- 'spec/controllers/api/v1/favourites_controller_spec.rb'
- 'spec/controllers/api/v1/filters_controller_spec.rb'
- 'spec/controllers/api/v1/follow_requests_controller_spec.rb'
- 'spec/controllers/api/v1/followed_tags_controller_spec.rb'
- 'spec/controllers/api/v1/instances/activity_controller_spec.rb'
- 'spec/controllers/api/v1/instances/peers_controller_spec.rb'
- 'spec/controllers/api/v1/instances_controller_spec.rb'
- 'spec/controllers/api/v1/lists_controller_spec.rb'
- 'spec/controllers/api/v1/markers_controller_spec.rb'
- 'spec/controllers/api/v1/media_controller_spec.rb'
- 'spec/controllers/api/v1/mutes_controller_spec.rb'
- 'spec/controllers/api/v1/notifications_controller_spec.rb'
- 'spec/controllers/api/v1/polls/votes_controller_spec.rb'
- 'spec/controllers/api/v1/polls_controller_spec.rb'
- 'spec/controllers/api/v1/reports_controller_spec.rb'
- 'spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb'
- 'spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb'
- 'spec/controllers/api/v1/statuses_controller_spec.rb'
- 'spec/controllers/api/v1/suggestions_controller_spec.rb'
- 'spec/controllers/api/v1/tags_controller_spec.rb'
- 'spec/controllers/api/v1/trends/tags_controller_spec.rb'
- 'spec/controllers/api/v2/admin/accounts_controller_spec.rb'
- 'spec/controllers/api/v2/filters/keywords_controller_spec.rb'
- 'spec/controllers/api/v2/filters/statuses_controller_spec.rb'
- 'spec/controllers/api/v2/filters_controller_spec.rb'
- 'spec/controllers/api/v2/search_controller_spec.rb'
- 'spec/controllers/application_controller_spec.rb'
- 'spec/controllers/auth/challenges_controller_spec.rb'
- 'spec/controllers/auth/confirmations_controller_spec.rb'
- 'spec/controllers/auth/passwords_controller_spec.rb'
- 'spec/controllers/auth/registrations_controller_spec.rb'
- 'spec/controllers/auth/sessions_controller_spec.rb'
- 'spec/controllers/concerns/account_controller_concern_spec.rb'
- 'spec/controllers/concerns/cache_concern_spec.rb'
- 'spec/controllers/concerns/challengable_concern_spec.rb'
- 'spec/controllers/concerns/export_controller_concern_spec.rb'
- 'spec/controllers/concerns/localized_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
- 'spec/controllers/concerns/user_tracking_concern_spec.rb'
- 'spec/controllers/disputes/appeals_controller_spec.rb'
- 'spec/controllers/disputes/strikes_controller_spec.rb'
- 'spec/controllers/home_controller_spec.rb'
- 'spec/controllers/instance_actors_controller_spec.rb'
- 'spec/controllers/intents_controller_spec.rb'
- 'spec/controllers/oauth/authorizations_controller_spec.rb'
- 'spec/controllers/oauth/tokens_controller_spec.rb'
- 'spec/controllers/settings/imports_controller_spec.rb'
- 'spec/controllers/settings/profiles_controller_spec.rb'
- 'spec/controllers/statuses_cleanup_controller_spec.rb'
- 'spec/controllers/tags_controller_spec.rb'
- 'spec/controllers/well_known/host_meta_controller_spec.rb'
- 'spec/controllers/well_known/nodeinfo_controller_spec.rb'
- 'spec/controllers/well_known/webfinger_controller_spec.rb'
- 'spec/helpers/accounts_helper_spec.rb'
- 'spec/helpers/admin/account_moderation_notes_helper_spec.rb'
- 'spec/helpers/admin/action_logs_helper_spec.rb'
- 'spec/helpers/flashes_helper_spec.rb'
- 'spec/helpers/formatting_helper_spec.rb'
- 'spec/helpers/home_helper_spec.rb'
- 'spec/helpers/routing_helper_spec.rb'
- 'spec/mailers/admin_mailer_spec.rb'
- 'spec/mailers/notification_mailer_spec.rb'
- 'spec/mailers/user_mailer_spec.rb'
- 'spec/models/account/field_spec.rb'
- 'spec/models/account_alias_spec.rb'
- 'spec/models/account_conversation_spec.rb'
- 'spec/models/account_deletion_request_spec.rb'
- 'spec/models/account_domain_block_spec.rb'
- 'spec/models/account_migration_spec.rb'
- 'spec/models/account_moderation_note_spec.rb'
- 'spec/models/account_spec.rb'
- 'spec/models/account_statuses_cleanup_policy_spec.rb'
- 'spec/models/admin/account_action_spec.rb'
- 'spec/models/admin/action_log_spec.rb'
- 'spec/models/announcement_mute_spec.rb'
- 'spec/models/announcement_reaction_spec.rb'
- 'spec/models/announcement_spec.rb'
- 'spec/models/backup_spec.rb'
- 'spec/models/block_spec.rb'
- 'spec/models/canonical_email_block_spec.rb'
- 'spec/models/conversation_mute_spec.rb'
- 'spec/models/conversation_spec.rb'
- 'spec/models/custom_emoji_spec.rb'
- 'spec/models/custom_filter_keyword_spec.rb'
- 'spec/models/custom_filter_spec.rb'
- 'spec/models/device_spec.rb'
- 'spec/models/domain_block_spec.rb'
- 'spec/models/email_domain_block_spec.rb'
- 'spec/models/encrypted_message_spec.rb'
- 'spec/models/favourite_spec.rb'
- 'spec/models/featured_tag_spec.rb'
- 'spec/models/follow_recommendation_suppression_spec.rb'
- 'spec/models/follow_request_spec.rb'
- 'spec/models/follow_spec.rb'
- 'spec/models/home_feed_spec.rb'
- 'spec/models/identity_spec.rb'
- 'spec/models/import_spec.rb'
- 'spec/models/invite_spec.rb'
- 'spec/models/list_account_spec.rb'
- 'spec/models/list_spec.rb'
- 'spec/models/login_activity_spec.rb'
- 'spec/models/media_attachment_spec.rb'
- 'spec/models/mention_spec.rb'
- 'spec/models/mute_spec.rb'
- 'spec/models/notification_spec.rb'
- 'spec/models/poll_vote_spec.rb'
- 'spec/models/preview_card_spec.rb'
- 'spec/models/preview_card_trend_spec.rb'
- 'spec/models/public_feed_spec.rb'
- 'spec/models/relay_spec.rb'
- 'spec/models/scheduled_status_spec.rb'
- 'spec/models/session_activation_spec.rb'
- 'spec/models/setting_spec.rb'
- 'spec/models/site_upload_spec.rb'
- 'spec/models/status_pin_spec.rb'
- 'spec/models/status_spec.rb'
- 'spec/models/status_stat_spec.rb'
- 'spec/models/status_trend_spec.rb'
- 'spec/models/system_key_spec.rb'
- 'spec/models/tag_follow_spec.rb'
- 'spec/models/unavailable_domain_spec.rb'
- 'spec/models/user_invite_request_spec.rb'
- 'spec/models/user_role_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/models/web/push_subscription_spec.rb'
- 'spec/models/web/setting_spec.rb'
- 'spec/models/webauthn_credentials_spec.rb'
- 'spec/models/webhook_spec.rb'
RSpec/RepeatedExample:
Exclude:
- 'spec/policies/status_policy_spec.rb'
@ -1120,7 +716,6 @@ RSpec/VerifiedDoubles:
- 'spec/controllers/api/web/embeds_controller_spec.rb'
- 'spec/controllers/auth/sessions_controller_spec.rb'
- 'spec/controllers/disputes/appeals_controller_spec.rb'
- 'spec/controllers/settings/imports_controller_spec.rb'
- 'spec/helpers/statuses_helper_spec.rb'
- 'spec/lib/suspicious_sign_in_detector_spec.rb'
- 'spec/models/account/field_spec.rb'
@ -1148,19 +743,6 @@ RSpec/VerifiedDoubles:
- 'spec/workers/feed_insert_worker_spec.rb'
- 'spec/workers/regeneration_worker_spec.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/ActiveRecordCallbacksOrder:
Exclude:
- 'app/models/account.rb'
- 'app/models/account_conversation.rb'
- 'app/models/announcement_reaction.rb'
- 'app/models/block.rb'
- 'app/models/media_attachment.rb'
- 'app/models/session_activation.rb'
- 'app/models/status.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationController:
Exclude:
@ -1216,12 +798,6 @@ Rails/CreateTableWithTimestamps:
- 'db/migrate/20220824233535_create_status_trends.rb'
- 'db/migrate/20221006061337_create_preview_card_trends.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Severity.
Rails/DeprecatedActiveModelErrorsMethods:
Exclude:
- 'lib/mastodon/accounts_cli.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity.
Rails/DuplicateAssociation:
@ -1235,74 +811,6 @@ Rails/Exit:
Exclude:
- 'config/boot.rb'
# Configuration parameters: EnforcedStyle.
# SupportedStyles: slashes, arguments
Rails/FilePath:
Exclude:
- 'app/lib/themes.rb'
- 'app/models/setting.rb'
- 'app/validators/reaction_validator.rb'
- 'config/environments/test.rb'
- 'config/initializers/locale.rb'
- 'db/migrate/20170716191202_add_hide_notifications_to_mute.rb'
- 'db/migrate/20171005171936_add_disabled_to_custom_emojis.rb'
- 'db/migrate/20171028221157_add_reblogs_to_follows.rb'
- 'db/migrate/20171107143332_add_memorial_to_accounts.rb'
- 'db/migrate/20171107143624_add_disabled_to_users.rb'
- 'db/migrate/20171109012327_add_moderator_to_accounts.rb'
- 'db/migrate/20171130000000_add_embed_url_to_preview_cards.rb'
- 'db/migrate/20180615122121_add_autofollow_to_invites.rb'
- 'db/migrate/20180707154237_add_whole_word_to_custom_filter.rb'
- 'db/migrate/20180814171349_add_confidential_to_doorkeeper_application.rb'
- 'db/migrate/20181010141500_add_silent_to_mentions.rb'
- 'db/migrate/20181017170937_add_reject_reports_to_domain_blocks.rb'
- 'db/migrate/20181018205649_add_unread_to_account_conversations.rb'
- 'db/migrate/20181127130500_identity_id_to_bigint.rb'
- 'db/migrate/20181127165847_add_show_replies_to_lists.rb'
- 'db/migrate/20190201012802_add_overwrite_to_imports.rb'
- 'db/migrate/20190306145741_add_lock_version_to_polls.rb'
- 'db/migrate/20190307234537_add_approved_to_users.rb'
- 'db/migrate/20191001213028_add_lock_version_to_account_stats.rb'
- 'db/migrate/20191212003415_increase_backup_size.rb'
- 'db/migrate/20200312144258_add_title_to_account_warning_presets.rb'
- 'db/migrate/20200620164023_add_fixed_lowercase_index_to_accounts.rb'
- 'db/migrate/20200917192924_add_notify_to_follows.rb'
- 'db/migrate/20201218054746_add_obfuscate_to_domain_blocks.rb'
- 'db/migrate/20210421121431_add_case_insensitive_btree_index_to_tags.rb'
- 'db/migrate/20211231080958_add_category_to_reports.rb'
- 'db/migrate/20220613110834_add_action_to_custom_filters.rb'
- 'db/post_migrate/20220307083603_optimize_null_index_conversations_uri.rb'
- 'db/post_migrate/20220310060545_optimize_null_index_statuses_in_reply_to_account_id.rb'
- 'db/post_migrate/20220310060556_optimize_null_index_statuses_in_reply_to_id.rb'
- 'db/post_migrate/20220310060614_optimize_null_index_media_attachments_scheduled_status_id.rb'
- 'db/post_migrate/20220310060626_optimize_null_index_media_attachments_shortcode.rb'
- 'db/post_migrate/20220310060641_optimize_null_index_users_reset_password_token.rb'
- 'db/post_migrate/20220310060653_optimize_null_index_users_created_by_application_id.rb'
- 'db/post_migrate/20220310060706_optimize_null_index_statuses_uri.rb'
- 'db/post_migrate/20220310060722_optimize_null_index_accounts_moved_to_account_id.rb'
- 'db/post_migrate/20220310060740_optimize_null_index_oauth_access_tokens_refresh_token.rb'
- 'db/post_migrate/20220310060750_optimize_null_index_accounts_url.rb'
- 'db/post_migrate/20220310060809_optimize_null_index_oauth_access_tokens_resource_owner_id.rb'
- 'db/post_migrate/20220310060833_optimize_null_index_announcement_reactions_custom_emoji_id.rb'
- 'db/post_migrate/20220310060854_optimize_null_index_appeals_approved_by_account_id.rb'
- 'db/post_migrate/20220310060913_optimize_null_index_account_migrations_target_account_id.rb'
- 'db/post_migrate/20220310060926_optimize_null_index_appeals_rejected_by_account_id.rb'
- 'db/post_migrate/20220310060939_optimize_null_index_list_accounts_follow_id.rb'
- 'db/post_migrate/20220310060959_optimize_null_index_web_push_subscriptions_access_token_id.rb'
- 'db/post_migrate/20220613110802_remove_whole_word_from_custom_filters.rb'
- 'db/post_migrate/20220613110903_remove_irreversible_from_custom_filters.rb'
- 'db/post_migrate/20220617202502_migrate_roles.rb'
- 'db/seeds.rb'
- 'db/seeds/03_roles.rb'
- 'lib/tasks/branding.rake'
- 'lib/tasks/emojis.rake'
- 'lib/tasks/repo.rake'
- 'spec/controllers/admin/custom_emojis_controller_spec.rb'
- 'spec/fabricators/custom_emoji_fabricator.rb'
- 'spec/fabricators/site_upload_fabricator.rb'
- 'spec/rails_helper.rb'
- 'spec/spec_helper.rb'
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasAndBelongsToMany:
@ -1445,12 +953,29 @@ Rails/SkipsModelValidations:
- 'spec/services/follow_service_spec.rb'
- 'spec/services/update_account_service_spec.rb'
Rails/TransactionExitStatement:
# Configuration parameters: Include.
# Include: db/**/*.rb
Rails/ThreeStateBooleanColumn:
Exclude:
- 'app/lib/activitypub/activity/announce.rb'
- 'app/lib/activitypub/activity/create.rb'
- 'app/lib/activitypub/activity/delete.rb'
- 'app/services/activitypub/process_account_service.rb'
- 'db/migrate/20160325130944_add_admin_to_users.rb'
- 'db/migrate/20161123093447_add_sensitive_to_statuses.rb'
- 'db/migrate/20170123203248_add_reject_media_to_domain_blocks.rb'
- 'db/migrate/20170127165745_add_devise_two_factor_to_users.rb'
- 'db/migrate/20170209184350_add_reply_to_statuses.rb'
- 'db/migrate/20170330163835_create_imports.rb'
- 'db/migrate/20170905165803_add_local_to_statuses.rb'
- 'db/migrate/20181203021853_add_discoverable_to_accounts.rb'
- 'db/migrate/20190509164208_add_by_moderator_to_tombstone.rb'
- 'db/migrate/20190805123746_add_capabilities_to_tags.rb'
- 'db/migrate/20191212163405_add_hide_collections_to_accounts.rb'
- 'db/migrate/20200309150742_add_forwarded_to_reports.rb'
- 'db/migrate/20210609202149_create_login_activities.rb'
- 'db/migrate/20210621221010_add_skip_sign_in_token_to_users.rb'
- 'db/migrate/20211031031021_create_preview_card_providers.rb'
- 'db/migrate/20211115032527_add_trendable_to_preview_cards.rb'
- 'db/migrate/20220202200743_add_trendable_to_accounts.rb'
- 'db/migrate/20220202200926_add_trendable_to_statuses.rb'
- 'db/migrate/20220303000827_add_ordered_media_attachment_ids_to_status_edits.rb'
# Configuration parameters: Include.
# Include: app/models/**/*.rb
@ -1519,12 +1044,6 @@ Style/CaseEquality:
Exclude:
- 'config/initializers/trusted_proxies.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: MinBranchesCount.
Style/CaseLikeIf:
Exclude:
- 'app/controllers/concerns/signature_verification.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedMethods, AllowedPatterns.
# AllowedMethods: ==, equal?, eql?
@ -1542,16 +1061,10 @@ Style/CombinableLoops:
- 'app/models/form/custom_emoji_batch.rb'
- 'app/models/form/ip_block_batch.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/ConcatArrayLiterals:
Exclude:
- 'app/lib/feed_manager.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowedVars.
Style/FetchEnvVar:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/lib/redis_configuration.rb'
- 'app/lib/translation_service.rb'
- 'config/environments/development.rb'
@ -2001,7 +1514,6 @@ Style/GuardClause:
- 'app/controllers/auth/passwords_controller.rb'
- 'app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb'
- 'app/lib/activitypub/activity/block.rb'
- 'app/lib/connection_pool/shared_connection_pool.rb'
- 'app/lib/request.rb'
- 'app/lib/request_pool.rb'
- 'app/lib/webfinger.rb'
@ -2036,7 +1548,6 @@ Style/HashAsLastArrayItem:
Exclude:
- 'app/controllers/admin/statuses_controller.rb'
- 'app/controllers/api/v1/statuses_controller.rb'
- 'app/models/account.rb'
- 'app/models/concerns/account_counters.rb'
- 'app/models/concerns/status_threading_concern.rb'
- 'app/models/status.rb'
@ -2044,19 +1555,6 @@ Style/HashAsLastArrayItem:
- 'app/services/notify_service.rb'
- 'db/migrate/20181024224956_migrate_account_conversations.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
# SupportedShorthandSyntax: always, never, either, consistent
Style/HashSyntax:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/models/media_attachment.rb'
- 'lib/terrapin/multi_pipe_extensions.rb'
- 'spec/controllers/admin/reports/actions_controller_spec.rb'
- 'spec/controllers/admin/statuses_controller_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformValues:
Exclude:
@ -2074,22 +1572,8 @@ Style/IfUnlessModifier:
# Configuration parameters: InverseMethods, InverseBlocks.
Style/InverseMethods:
Exclude:
- 'app/controllers/concerns/signature_verification.rb'
- 'app/helpers/jsonld_helper.rb'
- 'app/lib/activitypub/activity/create.rb'
- 'app/lib/activitypub/activity/move.rb'
- 'app/lib/feed_manager.rb'
- 'app/lib/link_details_extractor.rb'
- 'app/models/concerns/attachmentable.rb'
- 'app/models/concerns/remotable.rb'
- 'app/models/custom_filter.rb'
- 'app/models/webhook.rb'
- 'app/services/activitypub/process_status_update_service.rb'
- 'app/services/fetch_link_card_service.rb'
- 'app/services/search_service.rb'
- 'app/services/update_account_service.rb'
- 'app/workers/web/push_notification_worker.rb'
- 'lib/paperclip/color_extractor.rb'
- 'spec/controllers/activitypub/replies_controller_spec.rb'
# This cop supports safe autocorrection (--autocorrect).
@ -2110,12 +1594,10 @@ Style/MapToHash:
# SupportedStyles: literals, strict
Style/MutableConstant:
Exclude:
- 'app/models/account.rb'
- 'app/models/tag.rb'
- 'app/services/delete_account_service.rb'
- 'config/initializers/twitter_regex.rb'
- 'lib/mastodon/migration_warning.rb'
- 'spec/controllers/api/base_controller_spec.rb'
# This cop supports safe autocorrection (--autocorrect).
Style/NilLambda:
@ -2199,7 +1681,6 @@ Style/RedundantRegexpEscape:
Style/RegexpLiteral:
Exclude:
- 'app/lib/link_details_extractor.rb'
- 'app/lib/permalink_redirector.rb'
- 'app/lib/plain_text_formatter.rb'
- 'app/lib/tag_manager.rb'
- 'app/lib/text_formatter.rb'
@ -2321,11 +1802,14 @@ Style/TrailingCommaInHashLiteral:
- 'config/environments/test.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: WordRegex.
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle : percent
MinSize : 6
Exclude:
- 'app/helpers/languages_helper.rb'
- 'config/initializers/cors.rb'
- 'spec/controllers/settings/imports_controller_spec.rb'
- 'spec/models/form/import_spec.rb'
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.