about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2019-06-06 19:31:48 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-06-06 12:31:48 +0200
commit70423ce81ff43919a96688257ae3517066e483b1 (patch)
treee6188601379739ffd8a63ad26c0cb78f62390d84
parentc402c291f4991e2b021d8c13b557e6a8f650dcf3 (diff)
require rubocop-rails in .rubocop.yml (#10974)
* Revert "Revert #10957 (rubocop-rails) which is incompatible with CodeClimate (#10965)"

This reverts commit 121d19d7fa239c52ce86352d3fdae0649c892a20.

* Disable Rails/HelperInstanceVariable
-rw-r--r--.rubocop.yml6
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock4
3 files changed, 11 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index f1095e022..8bd4c867f 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,3 +1,6 @@
+require:
+  - rubocop-rails
+
 AllCops:
   TargetRubyVersion: 2.3
   Exclude:
@@ -82,6 +85,9 @@ Rails/Exit:
     - 'lib/mastodon/*'
     - 'lib/cli.rb'
 
+Rails/HelperInstanceVariable:
+  Enabled: false
+
 Style/ClassAndModuleChildren:
   Enabled: false
 
diff --git a/Gemfile b/Gemfile
index 62d5ae1f7..4fd981f75 100644
--- a/Gemfile
+++ b/Gemfile
@@ -129,6 +129,7 @@ group :development do
   gem 'letter_opener_web', '~> 1.3'
   gem 'memory_profiler'
   gem 'rubocop', '~> 0.71', require: false
+  gem 'rubocop-rails', '~> 2.0', require: false
   gem 'brakeman', '~> 4.5', require: false
   gem 'bundler-audit', '~> 0.6', require: false
 
diff --git a/Gemfile.lock b/Gemfile.lock
index 2d451be83..d8a68d8c9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -531,6 +531,9 @@ GEM
       rainbow (>= 2.2.2, < 4.0)
       ruby-progressbar (~> 1.7)
       unicode-display_width (>= 1.4.0, < 1.7)
+    rubocop-rails (2.0.0)
+      rack (>= 2.0)
+      rubocop (>= 0.70.0)
     ruby-progressbar (1.10.1)
     ruby-saml (1.9.0)
       nokogiri (>= 1.5.10)
@@ -735,6 +738,7 @@ DEPENDENCIES
   rspec-rails (~> 3.8)
   rspec-sidekiq (~> 3.0)
   rubocop (~> 0.71)
+  rubocop-rails (~> 2.0)
   sanitize (~> 5.0)
   sidekiq (~> 5.2)
   sidekiq-bulk (~> 0.2.0)