about summary refs log tree commit diff
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-03-10 10:32:37 -0500
committerGitHub <noreply@github.com>2023-03-10 16:32:37 +0100
commit3ea0856f707c0b59914d616608ae15cc6d9a9e1a (patch)
tree75e35a71ff02d1ef8849dce440324e19435785bf /.rubocop.yml
parent8931f18a218ed910cc242f680a81b533cc270ad3 (diff)
Enable RSpec/FilePath (#23965)
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index b4387a461..99206e597 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -96,9 +96,26 @@ Rails/Exit:
     - 'lib/mastodon/cli_helper.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:
   CustomTransform:
+    ActivityPub: activitypub # Ignore the snake_case due to the amount of files to rename
     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:
   EnforcedStyle: to_not