]> git.openstreetmap.org Git - rails.git/blobdiff - .rubocop.yml
Create an ApplicationRecord for models to inherit from
[rails.git] / .rubocop.yml
index 5e7be9797e8ebdef5de86cb4a3ff65acdf264cee..18bf69b9b85be093b8e2f81147cd08180a7d869a 100644 (file)
@@ -1,25 +1,13 @@
 inherit_from: .rubocop_todo.yml
 
 inherit_from: .rubocop_todo.yml
 
+require:
+  - rubocop-performance
+  - rubocop-rails
+
 AllCops:
 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
 
 Rails:
   Enabled: true
@@ -30,20 +18,32 @@ Layout/ExtraSpacing:
 Lint/PercentStringArray:
   Exclude:
     - 'config/initializers/secure_headers.rb'
 Lint/PercentStringArray:
   Exclude:
     - 'config/initializers/secure_headers.rb'
+    - 'app/controllers/application_controller.rb'
     - 'app/controllers/site_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'
 
 Naming/FileName:
   Exclude:
     - 'script/deliver-message'
     - 'script/locale/reload-languages'
     - 'script/update-spam-blocks'
 
-Rails/ApplicationRecord:
+Naming/UncommunicativeMethodParamName:
   Enabled: false
 
 Rails/CreateTableWithTimestamps:
   Enabled: false
 
   Enabled: false
 
 Rails/CreateTableWithTimestamps:
   Enabled: false
 
+Rails/FindEach:
+  Enabled: false
+
 Rails/HasManyOrHasOneDependent:
   Enabled: false
 
 Rails/HasManyOrHasOneDependent:
   Enabled: false
 
@@ -56,7 +56,7 @@ Rails/InverseOf:
 Rails/SkipsModelValidations:
   Exclude:
     - 'db/migrate/*.rb'
 Rails/SkipsModelValidations:
   Exclude:
     - 'db/migrate/*.rb'
-    - 'app/controllers/user_controller.rb'
+    - 'app/controllers/users_controller.rb'
 
 Style/BracesAroundHashParameters:
   EnforcedStyle: context_dependent
 
 Style/BracesAroundHashParameters:
   EnforcedStyle: context_dependent
@@ -67,10 +67,6 @@ Style/FormatStringToken:
 Style/IfInsideElse:
   Enabled: false
 
 Style/IfInsideElse:
   Enabled: false
 
-Style/GlobalVars:
-  Exclude:
-    - 'lib/quad_tile/extconf.rb'
-
 Style/GuardClause:
   Enabled: false
 
 Style/GuardClause:
   Enabled: false
 
@@ -80,6 +76,11 @@ Style/HashSyntax:
     - 'lib/tasks/testing.rake'
     - 'config/initializers/wrap_parameters.rb'
 
     - 'lib/tasks/testing.rake'
     - 'config/initializers/wrap_parameters.rb'
 
+Style/MixinUsage:
+  Exclude:
+    - 'bin/setup'
+    - 'bin/update'
+
 Style/StringLiterals:
   EnforcedStyle: double_quotes
 
 Style/StringLiterals:
   EnforcedStyle: double_quotes