]> git.openstreetmap.org Git - rails.git/blobdiff - .rubocop.yml
change Max for rubocop Metrics/ModuleLength
[rails.git] / .rubocop.yml
index cb301ece1641571dcf263949f2aa7fa3e6cacdc8..77f26d863bf5b41a23ea4ca47540ab36eb21ff7c 100644 (file)
@@ -1,7 +1,13 @@
 inherit_from: .rubocop_todo.yml
 
+require:
+  - rubocop-performance
+  - rubocop-rails
+
 AllCops:
-  TargetRubyVersion: 2.3
+  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:
@@ -45,11 +59,14 @@ Rails/InverseOf:
 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