X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1ca77d6ddac1910e85eb7ef4dedf6f1e885307e1..df229c208dd43c9af87b370f6e52342b1cba2e58:/.rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index 690d984f7..1c41c027a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,13 @@ inherit_from: .rubocop_todo.yml +require: + - rubocop-performance + - rubocop-rails + AllCops: TargetRubyVersion: 2.5 + Exclude: + - 'vendor/**/*' Rails: Enabled: true @@ -15,16 +21,24 @@ Lint/PercentStringArray: - 'app/controllers/application_controller.rb' - 'app/controllers/site_controller.rb' +Metrics/BlockLength: + Exclude: + - 'config/routes.rb' + +Metrics/ClassLength: + Exclude: + - 'test/**/*' + +Metrics/ModuleLength: + Max: 150 + Naming/FileName: Exclude: - 'script/deliver-message' - 'script/locale/reload-languages' - 'script/update-spam-blocks' -Naming/UncommunicativeMethodParamName: - Enabled: false - -Rails/ApplicationRecord: +Naming/MethodParameterName: Enabled: false Rails/CreateTableWithTimestamps: @@ -47,8 +61,8 @@ Rails/SkipsModelValidations: - 'db/migrate/*.rb' - 'app/controllers/users_controller.rb' -Style/BracesAroundHashParameters: - EnforcedStyle: context_dependent +Style/Documentation: + Enabled: false Style/FormatStringToken: EnforcedStyle: template @@ -59,12 +73,21 @@ Style/IfInsideElse: Style/GuardClause: Enabled: false +Style/HashEachMethods: + Enabled: true + Style/HashSyntax: EnforcedStyle: hash_rockets Exclude: - 'lib/tasks/testing.rake' - 'config/initializers/wrap_parameters.rb' +Style/HashTransformKeys: + Enabled: true + +Style/HashTransformValues: + Enabled: true + Style/MixinUsage: Exclude: - 'bin/setup'