1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 15:58:28 +09:00

Enable RSpec/FilePath (#23965)

This commit is contained in:
Nick Schonning 2023-03-10 10:32:37 -05:00 committed by GitHub
parent 8931f18a21
commit 3ea0856f70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 72 deletions

View File

@ -96,9 +96,26 @@ Rails/Exit:
- 'lib/mastodon/cli_helper.rb' - 'lib/mastodon/cli_helper.rb'
- 'lib/cli.rb' - 'lib/cli.rb'
# Reason: Some single letter camel case files shouldn't be split
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecfilepath
RSpec/FilePath: RSpec/FilePath:
CustomTransform: CustomTransform:
ActivityPub: activitypub # Ignore the snake_case due to the amount of files to rename
DeepL: deepl DeepL: deepl
FetchOEmbedService: fetch_oembed_service
JsonLdHelper: jsonld_helper
OEmbedController: oembed_controller
OStatus: ostatus
NodeInfoController: nodeinfo_controller # NodeInfo isn't snake_cased for any of the instances
Exclude:
- 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder
- 'spec/lib/sanitize_config_spec.rb' # namespaces usually have separate folder
- 'spec/controllers/concerns/account_controller_concern_spec.rb' # Concerns describe ApplicationController and don't fit naming
- 'spec/controllers/concerns/export_controller_concern_spec.rb'
- 'spec/controllers/concerns/localized_spec.rb'
- 'spec/controllers/concerns/rate_limit_headers_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
- 'spec/controllers/concerns/user_tracking_concern_spec.rb'
RSpec/NotToNot: RSpec/NotToNot:
EnforcedStyle: to_not EnforcedStyle: to_not

View File

@ -655,78 +655,6 @@ RSpec/ExpectInHook:
- 'spec/controllers/settings/applications_controller_spec.rb' - 'spec/controllers/settings/applications_controller_spec.rb'
- 'spec/lib/status_filter_spec.rb' - 'spec/lib/status_filter_spec.rb'
# Offense count: 61
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Exclude:
- 'spec/config/initializers/rack_attack_spec.rb'
- 'spec/controllers/activitypub/claims_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/change_email_controller_spec.rb'
- 'spec/controllers/admin/users/roles_controller.rb'
- 'spec/controllers/api/oembed_controller_spec.rb'
- 'spec/controllers/concerns/account_controller_concern_spec.rb'
- 'spec/controllers/concerns/export_controller_concern_spec.rb'
- 'spec/controllers/concerns/localized_spec.rb'
- 'spec/controllers/concerns/rate_limit_headers_spec.rb'
- 'spec/controllers/concerns/signature_verification_spec.rb'
- 'spec/controllers/concerns/user_tracking_concern_spec.rb'
- 'spec/controllers/well_known/nodeinfo_controller_spec.rb'
- 'spec/helpers/admin/action_log_helper_spec.rb'
- 'spec/helpers/jsonld_helper_spec.rb'
- 'spec/lib/activitypub/activity/accept_spec.rb'
- 'spec/lib/activitypub/activity/add_spec.rb'
- 'spec/lib/activitypub/activity/announce_spec.rb'
- 'spec/lib/activitypub/activity/block_spec.rb'
- 'spec/lib/activitypub/activity/create_spec.rb'
- 'spec/lib/activitypub/activity/delete_spec.rb'
- 'spec/lib/activitypub/activity/flag_spec.rb'
- 'spec/lib/activitypub/activity/follow_spec.rb'
- 'spec/lib/activitypub/activity/like_spec.rb'
- 'spec/lib/activitypub/activity/move_spec.rb'
- 'spec/lib/activitypub/activity/reject_spec.rb'
- 'spec/lib/activitypub/activity/remove_spec.rb'
- 'spec/lib/activitypub/activity/undo_spec.rb'
- 'spec/lib/activitypub/activity/update_spec.rb'
- 'spec/lib/activitypub/adapter_spec.rb'
- 'spec/lib/activitypub/dereferencer_spec.rb'
- 'spec/lib/activitypub/linked_data_signature_spec.rb'
- 'spec/lib/activitypub/tag_manager_spec.rb'
- 'spec/lib/ostatus/tag_manager_spec.rb'
- 'spec/lib/sanitize_config_spec.rb'
- 'spec/serializers/activitypub/device_serializer_spec.rb'
- 'spec/serializers/activitypub/note_serializer_spec.rb'
- 'spec/serializers/activitypub/one_time_key_serializer_spec.rb'
- 'spec/serializers/activitypub/undo_like_serializer_spec.rb'
- 'spec/serializers/activitypub/vote_serializer_spec.rb'
- 'spec/serializers/activitypub/update_poll_serializer_spec.rb'
- 'spec/services/activitypub/fetch_featured_collection_service_spec.rb'
- 'spec/services/activitypub/fetch_featured_tags_collection_service_spec.rb'
- 'spec/services/activitypub/fetch_remote_account_service_spec.rb'
- 'spec/services/activitypub/fetch_remote_actor_service_spec.rb'
- 'spec/services/activitypub/fetch_remote_key_service_spec.rb'
- 'spec/services/activitypub/fetch_remote_status_service_spec.rb'
- 'spec/services/activitypub/fetch_replies_service_spec.rb'
- 'spec/services/activitypub/process_account_service_spec.rb'
- 'spec/services/activitypub/process_collection_service_spec.rb'
- 'spec/services/activitypub/process_status_update_service_spec.rb'
- 'spec/services/activitypub/synchronize_followers_service_spec.rb'
- 'spec/services/fetch_oembed_service_spec.rb'
- 'spec/services/remove_from_follwers_service_spec.rb'
- 'spec/workers/activitypub/delivery_worker_spec.rb'
- 'spec/workers/activitypub/distribute_poll_update_worker_spec.rb'
- 'spec/workers/activitypub/distribution_worker_spec.rb'
- 'spec/workers/activitypub/fetch_replies_worker_spec.rb'
- 'spec/workers/activitypub/move_distribution_worker_spec.rb'
- 'spec/workers/activitypub/processing_worker_spec.rb'
- 'spec/workers/activitypub/status_update_distribution_worker_spec.rb'
- 'spec/workers/activitypub/update_distribution_worker_spec.rb'
# Offense count: 16 # Offense count: 16
# This cop supports safe autocorrection (--autocorrect). # This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.