Skip to content

Commit 159045f

Browse files
committed
Enable InternalAffairs/CopEnabled cop
Since #1434 made RuboCop 1.72+ a runtime requirement, `cop_enabled?` can now be used.
1 parent 12b45a5 commit 159045f

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 2
10-
# This cop supports safe autocorrection (--autocorrect).
11-
InternalAffairs/CopEnabled:
12-
Exclude:
13-
- 'lib/rubocop/cop/rails/blank.rb'
14-
- 'lib/rubocop/cop/rails/present.rb'
15-
169
# Offense count: 7
1710
InternalAffairs/NodeDestructuring:
1811
Exclude:

lib/rubocop/cop/rails/blank.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def on_or(node)
123123
def on_if(node)
124124
return unless cop_config['UnlessPresent']
125125
return unless node.unless?
126-
return if node.else? && config.for_cop('Style/UnlessElse')['Enabled']
126+
return if node.else? && config.cop_enabled?('Style/UnlessElse')
127127

128128
unless_present?(node) do |method_call, receiver|
129129
range = unless_condition(node, method_call)

lib/rubocop/cop/rails/present.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def on_or(node)
110110
def on_if(node)
111111
return unless cop_config['UnlessBlank']
112112
return unless node.unless?
113-
return if node.else? && config.for_cop('Style/UnlessElse')['Enabled']
113+
return if node.else? && config.cop_enabled?('Style/UnlessElse')
114114

115115
unless_blank?(node) do |method_call, receiver|
116116
range = unless_condition(node, method_call)

0 commit comments

Comments
 (0)