Skip to content

Commit 0bbd218

Browse files
committed
Apply rubocop --auto-gen-config
This commit applies `rubocop --auto-gen-config` to suppress the following offense: ```console $ bundle exec rubocop (snip) Offenses: lib/rubocop/cop/rails/blank.rb:126:35: C: [Correctable] InternalAffairs/CopEnabled: Use config.cop_enabled?('Style/UnlessElse') instead of config.for_cop('Style/UnlessElse')['Enabled']. return if node.else? && config.for_cop('Style/UnlessElse')['Enabled'] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/rubocop/cop/rails/present.rb:113:35: C: [Correctable] InternalAffairs/CopEnabled: Use config.cop_enabled?('Style/UnlessElse') instead of config.for_cop('Style/UnlessElse')['Enabled']. return if node.else? && config.for_cop('Style/UnlessElse')['Enabled'] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 296 files inspected, 2 offenses detected, 2 offenses autocorrectable RuboCop failed! ``` In the future, the offense of `InternalAffairs/CopEnabled` can be autocorrected, but raising the minimum required RuboCop version just for that should be avoided.
1 parent e470d18 commit 0bbd218

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.rubocop_todo.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2020-01-22 14:25:37 -0500 using RuboCop version 0.79.0.
3+
# on 2024-12-13 20:32:15 UTC using RuboCop version 1.69.2.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
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: 6
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+
16+
# Offense count: 7
1017
InternalAffairs/NodeDestructuring:
1118
Exclude:
1219
- 'lib/rubocop/cop/rails/environment_comparison.rb'
@@ -16,31 +23,26 @@ InternalAffairs/NodeDestructuring:
1623
- 'lib/rubocop/cop/rails/time_zone.rb'
1724

1825
# Offense count: 10
19-
Metrics/AbcSize:
20-
Max: 17
21-
22-
# Offense count: 4
23-
# Configuration parameters: CountComments.
26+
# Configuration parameters: CountComments, CountAsOne.
2427
Metrics/ClassLength:
25-
Max: 173
28+
Max: 163
2629

27-
# Offense count: 26
28-
# Configuration parameters: CountComments, ExcludedMethods.
30+
# Offense count: 41
31+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
2932
Metrics/MethodLength:
3033
Max: 14
3134

32-
# Offense count: 77
33-
# Configuration parameters: Prefixes.
35+
# Offense count: 178
36+
# Configuration parameters: Prefixes, AllowedPatterns.
3437
# Prefixes: when, with, without
3538
RSpec/ContextWording:
3639
Enabled: false
3740

38-
# Offense count: 287
39-
# Configuration parameters: Max.
41+
# Offense count: 1035
42+
# Configuration parameters: CountAsOne.
4043
RSpec/ExampleLength:
41-
Enabled: false
44+
Max: 108
4245

43-
# Offense count: 36
44-
# Configuration parameters: AggregateFailuresByDefault.
46+
# Offense count: 688
4547
RSpec/MultipleExpectations:
4648
Max: 5

0 commit comments

Comments
 (0)