Browse Source

require rubocop-rails in .rubocop.yml (#10974)

* Revert "Revert #10957 (rubocop-rails) which is incompatible with CodeClimate (#10965)"

This reverts commit 121d19d7fa.

* Disable Rails/HelperInstanceVariable
tags/v2.9.0rc1
Yamagishi Kazutoshi 4 months ago
parent
commit
70423ce81f
3 changed files with 11 additions and 0 deletions
  1. 6
    0
      .rubocop.yml
  2. 1
    0
      Gemfile
  3. 4
    0
      Gemfile.lock

+ 6
- 0
.rubocop.yml View File

@@ -1,3 +1,6 @@
1
+require:
2
+  - rubocop-rails
3
+
1 4
 AllCops:
2 5
   TargetRubyVersion: 2.3
3 6
   Exclude:
@@ -82,6 +85,9 @@ Rails/Exit:
82 85
     - 'lib/mastodon/*'
83 86
     - 'lib/cli.rb'
84 87
 
88
+Rails/HelperInstanceVariable:
89
+  Enabled: false
90
+
85 91
 Style/ClassAndModuleChildren:
86 92
   Enabled: false
87 93
 

+ 1
- 0
Gemfile View File

@@ -129,6 +129,7 @@ group :development do
129 129
   gem 'letter_opener_web', '~> 1.3'
130 130
   gem 'memory_profiler'
131 131
   gem 'rubocop', '~> 0.71', require: false
132
+  gem 'rubocop-rails', '~> 2.0', require: false
132 133
   gem 'brakeman', '~> 4.5', require: false
133 134
   gem 'bundler-audit', '~> 0.6', require: false
134 135
 

+ 4
- 0
Gemfile.lock View File

@@ -531,6 +531,9 @@ GEM
531 531
       rainbow (>= 2.2.2, < 4.0)
532 532
       ruby-progressbar (~> 1.7)
533 533
       unicode-display_width (>= 1.4.0, < 1.7)
534
+    rubocop-rails (2.0.0)
535
+      rack (>= 2.0)
536
+      rubocop (>= 0.70.0)
534 537
     ruby-progressbar (1.10.1)
535 538
     ruby-saml (1.9.0)
536 539
       nokogiri (>= 1.5.10)
@@ -735,6 +738,7 @@ DEPENDENCIES
735 738
   rspec-rails (~> 3.8)
736 739
   rspec-sidekiq (~> 3.0)
737 740
   rubocop (~> 0.71)
741
+  rubocop-rails (~> 2.0)
738 742
   sanitize (~> 5.0)
739 743
   sidekiq (~> 5.2)
740 744
   sidekiq-bulk (~> 0.2.0)

Loading…
Cancel
Save