X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/aa1fb6dbb8c2e71b8ce8c231ae1272a2dfebd75a..50b2f4f656b82112fce4939da26a1afc6b140e89:/.rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index 55be8141c..1ae01086a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,25 +1,13 @@ inherit_from: .rubocop_todo.yml +require: + - rubocop-performance + - rubocop-rails + AllCops: - Include: - - '**/*.gemspec' - - '**/*.podspec' - - '**/*.jbuilder' - - '**/*.rake' - - '**/*.opal' - - '**/config.ru' - - '**/Gemfile' - - '**/Rakefile' - - '**/Capfile' - - '**/Guardfile' - - '**/Podfile' - - '**/Thorfile' - - '**/Vagrantfile' - - '**/Berksfile' - - '**/Cheffile' - - '**/Vagabondfile' - - '**/Fastfile' - - '**/*.builder' + TargetRubyVersion: 2.5 + Exclude: + - 'vendor/**/*' Rails: Enabled: true @@ -30,15 +18,30 @@ Layout/ExtraSpacing: Lint/PercentStringArray: Exclude: - 'config/initializers/secure_headers.rb' + - 'app/controllers/application_controller.rb' - 'app/controllers/site_controller.rb' +Metrics/BlockLength: + Exclude: + - 'config/routes.rb' + +Metrics/ClassLength: + Exclude: + - 'test/**/*' + Naming/FileName: Exclude: - 'script/deliver-message' - 'script/locale/reload-languages' - 'script/update-spam-blocks' -Rails/ApplicationRecord: +Naming/MethodParameterName: + Enabled: false + +Rails/CreateTableWithTimestamps: + Enabled: false + +Rails/FindEach: Enabled: false Rails/HasManyOrHasOneDependent: @@ -47,24 +50,26 @@ Rails/HasManyOrHasOneDependent: Rails/HttpPositionalArguments: Enabled: false +Rails/InverseOf: + Enabled: false + Rails/SkipsModelValidations: Exclude: - 'db/migrate/*.rb' - - 'app/controllers/user_controller.rb' + - 'app/controllers/users_controller.rb' Style/BracesAroundHashParameters: EnforcedStyle: context_dependent +Style/Documentation: + Enabled: false + Style/FormatStringToken: EnforcedStyle: template Style/IfInsideElse: Enabled: false -Style/GlobalVars: - Exclude: - - 'lib/quad_tile/extconf.rb' - Style/GuardClause: Enabled: false @@ -74,6 +79,11 @@ Style/HashSyntax: - 'lib/tasks/testing.rake' - 'config/initializers/wrap_parameters.rb' +Style/MixinUsage: + Exclude: + - 'bin/setup' + - 'bin/update' + Style/StringLiterals: EnforcedStyle: double_quotes