X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/50e5d6a65934fd22129aa9e450db0b821c7750b0..959bc5562a67439eb7577ce5b93e60348ddabc92:/.rubocop.yml?ds=sidebyside diff --git a/.rubocop.yml b/.rubocop.yml index 97bb72e0a..d1b961dd5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,9 +7,10 @@ require: - rubocop-performance - rubocop-rails - rubocop-rake + - ./.rubocop/specific_action_names.rb AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 NewCops: enable Exclude: - 'vendor/**/*' @@ -37,9 +38,6 @@ Metrics/ClassLength: Metrics/ModuleLength: Max: 150 -Minitest/MultipleAssertions: - Enabled: false - Naming/FileName: Exclude: - 'script/deliver-message' @@ -48,6 +46,10 @@ Naming/FileName: Naming/MethodParameterName: Enabled: false +# This conflicts with Strong Migrations, which can't check `change_table` +Rails/BulkChangeTable: + Enabled: false + Rails/CreateTableWithTimestamps: Enabled: false @@ -69,7 +71,7 @@ Rails/ReflectionClassName: Rails/SkipsModelValidations: Exclude: - 'db/migrate/*.rb' - - 'app/controllers/users_controller.rb' + - 'app/controllers/users/lists_controller.rb' Style/Documentation: Enabled: false @@ -109,3 +111,42 @@ Style/StringLiterals: 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/nodes_controller.rb' + - 'app/controllers/api/notes_controller.rb' + - 'app/controllers/api/old_elements_controller.rb' + - 'app/controllers/api/relations_controller.rb' + - 'app/controllers/api/user_preferences_controller.rb' + - 'app/controllers/api/users_controller.rb' + - 'app/controllers/api/ways_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/messages_controller.rb' + - 'app/controllers/site_controller.rb' + - 'app/controllers/traces_controller.rb' + - 'app/controllers/users_controller.rb'