X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/aa1fb6dbb8c2e71b8ce8c231ae1272a2dfebd75a..0d936de9c90f0bf7ab9fe672c3ca8c7397d9ac85:/.rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index 55be8141c..5bf565c31 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,25 +1,11 @@ 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 Rails: Enabled: true @@ -30,6 +16,7 @@ Layout/ExtraSpacing: Lint/PercentStringArray: Exclude: - 'config/initializers/secure_headers.rb' + - 'app/controllers/application_controller.rb' - 'app/controllers/site_controller.rb' Naming/FileName: @@ -38,19 +25,31 @@ Naming/FileName: - 'script/locale/reload-languages' - 'script/update-spam-blocks' +Naming/UncommunicativeMethodParamName: + Enabled: false + Rails/ApplicationRecord: Enabled: false +Rails/CreateTableWithTimestamps: + Enabled: false + +Rails/FindEach: + Enabled: false + Rails/HasManyOrHasOneDependent: Enabled: false 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 @@ -61,10 +60,6 @@ Style/FormatStringToken: Style/IfInsideElse: Enabled: false -Style/GlobalVars: - Exclude: - - 'lib/quad_tile/extconf.rb' - Style/GuardClause: Enabled: false @@ -74,6 +69,11 @@ Style/HashSyntax: - 'lib/tasks/testing.rake' - 'config/initializers/wrap_parameters.rb' +Style/MixinUsage: + Exclude: + - 'bin/setup' + - 'bin/update' + Style/StringLiterals: EnforcedStyle: double_quotes