We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 92c1343 + 17d7bd5 commit 0e800c1Copy full SHA for 0e800c1
README.md
@@ -6,7 +6,7 @@
6
7
**ruboclean** puts `.rubocop.yml` into order. It groups the configuration into three groups:
8
9
-1. "Base"-configuration like `require`, `inherit_from`, etc.
+1. "Base"-configuration like `plugins`, `inherit_from`, etc.
10
2. `Namespaces`
11
3. `Namespace/Cops`
12
@@ -34,7 +34,7 @@ AllCops:
34
- path_without_files/**/* # Will be removed if no files within pattern exist. Skip with --preserve-paths option.
35
36
# Preceding comments will be removed unless the --preserve-comments option is used.
37
-require:
+plugins:
38
- rubocop-rails # Inline comments will always be removed.
39
```
40
@@ -43,7 +43,7 @@ require:
43
```yml
44
---
45
46
47
- rubocop-rails
48
49
AllCops:
lib/ruboclean/grouper.rb
@@ -2,7 +2,7 @@
2
3
module Ruboclean
4
# Groups the rubocop configuration items into three categories:
5
- # - base: base configuration like 'require', 'inherit_from', etc
+ # - base: base configuration like 'plugins', 'inherit_from', etc
# - namespaces: every item which does **not** include an "/"
# - cops: every item which **includes** an "/"
class Grouper
test/fixtures/00_expected_output.yml
@@ -3,7 +3,7 @@
inherit_from:
- shared.yml
test/fixtures/00_expected_output_with_preserved_comments.yml
@@ -4,8 +4,8 @@
-# preceding require: comment, wrongly indented
+# preceding plugins: comment, wrongly indented
# multiline
test/fixtures/00_expected_output_with_preserved_paths.yml
test/fixtures/00_input.yml
@@ -25,8 +25,8 @@ AllCops:
25
- file_exists.rb
26
- subdirectory/file_exists.rb
27
28
- # preceding require: comment, wrongly indented
29
+ # preceding plugins: comment, wrongly indented
30
31
32
…xpected_output_without_require_block.yml …xpected_output_without_plugins_block.ymltest/fixtures/01_expected_output_without_require_block.yml renamed to test/fixtures/01_expected_output_without_plugins_block.yml
…tures/01_input_without_require_block.yml …tures/01_input_without_plugins_block.ymltest/fixtures/01_input_without_require_block.yml renamed to test/fixtures/01_input_without_plugins_block.yml
test/ruboclean/grouper_test.rb
@@ -16,7 +16,7 @@ def test_group_config_with_empty_configuration
16
end
17
18
def test_group_config_only_base
19
- config_hash = { "require" => ["rubocop-rails"] }
+ config_hash = { "plugins" => ["rubocop-rails"] }
20
21
group_config_with(config_hash).tap do |result|
22
assert_equal 3, result.keys.size
test/ruboclean/orderer_test.rb
@@ -6,8 +6,8 @@ module Ruboclean
class OrdererTest < BaseTest
def test_order_all
input = { "Foo/Foo" => nil, "Foo/Faa" => nil, "Baz" => nil,
- "Bar" => nil, "require" => nil, "inherit_from" => nil }
- output = { "inherit_from" => nil, "require" => nil, "Bar" => nil,
+ "Bar" => nil, "plugins" => nil, "inherit_from" => nil }
+ output = { "inherit_from" => nil, "plugins" => nil, "Bar" => nil,
"Baz" => nil, "Foo/Faa" => nil, "Foo/Foo" => nil }
13
assert_ordered input, output
@@ -28,8 +28,8 @@ def test_order_without_namespaces
def test_order_without_cops
- input = { "Baz" => nil, "Bar" => nil, "require" => nil }
- output = { "require" => nil, "Bar" => nil, "Baz" => nil }
+ input = { "Baz" => nil, "Bar" => nil, "plugins" => nil }
+ output = { "plugins" => nil, "Bar" => nil, "Baz" => nil }
33
0 commit comments