Skip to content

Commit 9fd4371

Browse files
committed
Extract rubocop.infer.yml
1 parent 5d617fc commit 9fd4371

File tree

3 files changed

+19
-2642
lines changed

3 files changed

+19
-2642
lines changed

rubocop.infer.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<%
2+
# Identify installed RuboCop plugins to configure
3+
plugin_configs = {
4+
"rubocop" => "rubocop.yml",
5+
"rubocop-graphql" => "rubocop.graphql.yml",
6+
"rubocop-minitest" => "rubocop.minitest.yml",
7+
"rubocop-performance" => "rubocop.performance.yml",
8+
"rubocop-rails" => "rubocop.rails.yml",
9+
"rubocop-rake" => "rubocop.graphql.yml",
10+
"rubocop-rspec" => "rubocop.rspec.yml",
11+
}.select { |plugin_name, _| Gem.loaded_specs.include?(plugin_name) }
12+
%>
13+
14+
require: <%= plugin_configs.keys.to_json %>
15+
16+
inherit_from: <%= plugin_configs.values.to_json %>

rubocop.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,6 @@ inherit_mode:
33
- Exclude
44
- Include
55

6-
<%
7-
# Identify installed RuboCop plugins to configure
8-
plugin_configs = {
9-
"rubocop-graphql" => "rubocop.graphql.yml",
10-
"rubocop-minitest" => "rubocop.minitest.yml",
11-
"rubocop-performance" => "rubocop.performance.yml",
12-
"rubocop-rails" => "rubocop.rails.yml",
13-
"rubocop-rake" => "rubocop.graphql.yml",
14-
"rubocop-rspec" => "rubocop.rspec.yml",
15-
}.select { |plugin_name, _| Gem.loaded_specs.include?(plugin_name) }
16-
%>
17-
18-
require: <%= plugin_configs.keys.to_json %>
19-
20-
inherit_from: <%= plugin_configs.values.to_json %>
21-
226
AllCops:
237
StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
248

0 commit comments

Comments
 (0)