]> git.openstreetmap.org Git - rails.git/blobdiff - .rubocop.yml
Merge branch 'pull/5715'
[rails.git] / .rubocop.yml
index c0f0c1fa08053ec082a77ae9cd8e6e3d0facb874..c3f4a2bc8b4c8b4181054932567820eb59132a8a 100644 (file)
@@ -1,15 +1,18 @@
 inherit_from: .rubocop_todo.yml
 
-require:
-  - rubocop-capybara
-  - rubocop-factory_bot
+plugins:
   - rubocop-minitest
   - rubocop-performance
   - rubocop-rails
   - rubocop-rake
 
+require:
+  - rubocop-capybara
+  - rubocop-factory_bot
+  - ./.rubocop/specific_action_names.rb
+
 AllCops:
-  TargetRubyVersion: 3.0
+  TargetRubyVersion: 3.2
   NewCops: enable
   Exclude:
     - 'vendor/**/*'
@@ -70,7 +73,7 @@ Rails/ReflectionClassName:
 Rails/SkipsModelValidations:
   Exclude:
     - 'db/migrate/*.rb'
-    - 'app/controllers/users_controller.rb'
+    - 'app/controllers/users/lists_controller.rb'
 
 Style/Documentation:
   Enabled: false
@@ -105,8 +108,46 @@ Style/MixinUsage:
     - 'bin/setup'
     - 'bin/update'
 
+Style/RaiseArgs:
+  Exclude:
+    - 'lib/osm.rb'
+
 Style/StringLiterals:
   EnforcedStyle: double_quotes
 
 Style/SymbolArray:
   EnforcedStyle: brackets
+
+Rails/SpecificActionNames:
+  Description: Use only specific action names.
+  Enabled: true
+  ActionNames:
+    - index
+    - show
+    - new
+    - edit
+    - create
+    - update
+    - destroy
+  Include:
+    - app/controllers/**/*.rb
+  Exclude:
+    # This is a todo list, but is currently too long for `rubocop --auto-gen-config`
+    - 'app/controllers/api/changeset_comments_controller.rb'
+    - 'app/controllers/api/changesets_controller.rb'
+    - 'app/controllers/api/notes_controller.rb'
+    - 'app/controllers/api/user_preferences_controller.rb'
+    - 'app/controllers/api/users_controller.rb'
+    - 'app/controllers/browse_controller.rb'
+    - 'app/controllers/changesets_controller.rb'
+    - 'app/controllers/confirmations_controller.rb'
+    - 'app/controllers/diary_comments_controller.rb'
+    - 'app/controllers/diary_entries_controller.rb'
+    - 'app/controllers/directions_controller.rb'
+    - 'app/controllers/errors_controller.rb'
+    - 'app/controllers/export_controller.rb'
+    - 'app/controllers/geocoder_controller.rb'
+    - 'app/controllers/issues_controller.rb'
+    - 'app/controllers/site_controller.rb'
+    - 'app/controllers/traces_controller.rb'
+    - 'app/controllers/users_controller.rb'