]> git.openstreetmap.org Git - rails.git/blobdiff - .rubocop.yml
Allow moderators to hide diary entries and comments
[rails.git] / .rubocop.yml
index 5e7be9797e8ebdef5de86cb4a3ff65acdf264cee..d5ee8ff383722193f5769416d431faea2c3521c4 100644 (file)
@@ -1,25 +1,9 @@
 inherit_from: .rubocop_todo.yml
 
 inherit_from: .rubocop_todo.yml
 
+require: rubocop-performance
+
 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
 
 Rails:
   Enabled: true
 
 Rails:
   Enabled: true
@@ -30,6 +14,7 @@ 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'
 
 Naming/FileName:
     - 'app/controllers/site_controller.rb'
 
 Naming/FileName:
@@ -38,12 +23,18 @@ Naming/FileName:
     - 'script/locale/reload-languages'
     - 'script/update-spam-blocks'
 
     - 'script/locale/reload-languages'
     - 'script/update-spam-blocks'
 
+Naming/UncommunicativeMethodParamName:
+  Enabled: false
+
 Rails/ApplicationRecord:
   Enabled: false
 
 Rails/CreateTableWithTimestamps:
   Enabled: false
 
 Rails/ApplicationRecord:
   Enabled: false
 
 Rails/CreateTableWithTimestamps:
   Enabled: false
 
+Rails/FindEach:
+  Enabled: false
+
 Rails/HasManyOrHasOneDependent:
   Enabled: false
 
 Rails/HasManyOrHasOneDependent:
   Enabled: false
 
@@ -56,7 +47,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 +58,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 +67,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