]> git.openstreetmap.org Git - rails.git/blobdiff - .rubocop.yml
Create an ApplicationRecord for models to inherit from
[rails.git] / .rubocop.yml
index e12437e080c3d8f0d81731537acf0847ecfbf8bf..18bf69b9b85be093b8e2f81147cd08180a7d869a 100644 (file)
@@ -1,5 +1,14 @@
 inherit_from: .rubocop_todo.yml
 
+require:
+  - rubocop-performance
+  - rubocop-rails
+
+AllCops:
+  TargetRubyVersion: 2.5
+  Exclude:
+    - 'vendor/**/*'
+
 Rails:
   Enabled: true
 
@@ -12,6 +21,14 @@ Lint/PercentStringArray:
     - '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'
@@ -21,10 +38,10 @@ Naming/FileName:
 Naming/UncommunicativeMethodParamName:
   Enabled: false
 
-Rails/ApplicationRecord:
+Rails/CreateTableWithTimestamps:
   Enabled: false
 
-Rails/CreateTableWithTimestamps:
+Rails/FindEach:
   Enabled: false
 
 Rails/HasManyOrHasOneDependent:
@@ -39,7 +56,7 @@ Rails/InverseOf:
 Rails/SkipsModelValidations:
   Exclude:
     - 'db/migrate/*.rb'
-    - 'app/controllers/user_controller.rb'
+    - 'app/controllers/users_controller.rb'
 
 Style/BracesAroundHashParameters:
   EnforcedStyle: context_dependent
@@ -50,10 +67,6 @@ Style/FormatStringToken:
 Style/IfInsideElse:
   Enabled: false
 
-Style/GlobalVars:
-  Exclude:
-    - 'lib/quad_tile/extconf.rb'
-
 Style/GuardClause:
   Enabled: false
 
@@ -63,6 +76,11 @@ Style/HashSyntax:
     - 'lib/tasks/testing.rake'
     - 'config/initializers/wrap_parameters.rb'
 
+Style/MixinUsage:
+  Exclude:
+    - 'bin/setup'
+    - 'bin/update'
+
 Style/StringLiterals:
   EnforcedStyle: double_quotes