rubocounsel 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rubocounsel/config_writer.rb +1 -1
- data/lib/rubocounsel/counselor.rb +6 -2
- data/lib/rubocounsel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df8f7f81d3443e7d62fbf3dc59fb31d2f0e491c93fec1b7c9e6d8150266d7517
|
|
4
|
+
data.tar.gz: ea8ffb9483013e9194dd188bc6300ffe5f0009f1cced90330f8099987925a9df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb5255b7e2f10bb3ed885a1db2e21abff41ef12b90dd553b79a9f153b67abab42de64e3dc20d629c9a64fcc95b493e67d6d9e7e584ccf60f981ec1fdf49b1e51
|
|
7
|
+
data.tar.gz: c11acd191699d9d282e13120277fa125b9b5d02e714b97f54ff7d02495c913faef843d208ff700e2dab9fa3190b52e77821c526247372b41d2e4404e4ac5f7f4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.1.1] - 2026-03-21
|
|
4
|
+
|
|
5
|
+
- Show "Enable" action instead of "Configure" for cops with no configurable attributes
|
|
6
|
+
- Add `inherit_gem` and `plugins` as priority keys in generated `.rubocop.yml`
|
|
7
|
+
|
|
3
8
|
## [0.1.0] - 2025-10-26
|
|
4
9
|
|
|
5
10
|
- Initial release
|
|
@@ -15,7 +15,7 @@ module RuboCounsel
|
|
|
15
15
|
# "Metrics/MethodLength" => { "Max" => 15 }
|
|
16
16
|
# }
|
|
17
17
|
class ConfigWriter
|
|
18
|
-
PRIORITY_KEYS = ["inherit_from", "inherit_mode", "require", "AllCops"].freeze
|
|
18
|
+
PRIORITY_KEYS = ["inherit_gem", "plugins", "inherit_from", "inherit_mode", "require", "AllCops"].freeze
|
|
19
19
|
|
|
20
20
|
attr_reader :choices
|
|
21
21
|
|
|
@@ -14,7 +14,8 @@ module RuboCounsel
|
|
|
14
14
|
#
|
|
15
15
|
# Cops that are already configured in .rubocop.yml are skipped by default.
|
|
16
16
|
class Counselor
|
|
17
|
-
|
|
17
|
+
CONFIGURABLE_ACTIONS = ["Configure", "Disable", "Skip"].freeze
|
|
18
|
+
SIMPLE_ACTIONS = ["Enable", "Disable", "Skip"].freeze
|
|
18
19
|
FILE_TARGETING_ATTRIBUTES = ["Include", "Exclude"].freeze
|
|
19
20
|
|
|
20
21
|
def initialize(cop_names, catalog: CopCatalog.new, user_config: nil, output: $stdout)
|
|
@@ -50,9 +51,12 @@ module RuboCounsel
|
|
|
50
51
|
|
|
51
52
|
::CLI::UI::Frame.open(entry.cop_name, color: :blue) do
|
|
52
53
|
display_cop_info(entry, docstring)
|
|
53
|
-
|
|
54
|
+
actions = entry.configurable_attributes.empty? ? SIMPLE_ACTIONS : CONFIGURABLE_ACTIONS
|
|
55
|
+
action = ::CLI::UI::Prompt.ask("What would you like to do?", options: actions)
|
|
54
56
|
|
|
55
57
|
case action
|
|
58
|
+
when "Enable"
|
|
59
|
+
{ "Enabled" => true }
|
|
56
60
|
when "Disable"
|
|
57
61
|
{ "Enabled" => false }
|
|
58
62
|
when "Skip"
|
data/lib/rubocounsel/version.rb
CHANGED