Skip to content

Commit

Permalink
Apply rubocop --auto-gen-config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
koic committed Dec 13, 2024
1 parent e470d18 commit 0bbd218
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-01-22 14:25:37 -0500 using RuboCop version 0.79.0.
# on 2024-12-13 20:32:15 UTC using RuboCop version 1.69.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 6
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
InternalAffairs/CopEnabled:
Exclude:
- 'lib/rubocop/cop/rails/blank.rb'
- 'lib/rubocop/cop/rails/present.rb'

# Offense count: 7
InternalAffairs/NodeDestructuring:
Exclude:
- 'lib/rubocop/cop/rails/environment_comparison.rb'
Expand All @@ -16,31 +23,26 @@ InternalAffairs/NodeDestructuring:
- 'lib/rubocop/cop/rails/time_zone.rb'

# Offense count: 10
Metrics/AbcSize:
Max: 17

# Offense count: 4
# Configuration parameters: CountComments.
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 173
Max: 163

# Offense count: 26
# Configuration parameters: CountComments, ExcludedMethods.
# Offense count: 41
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 14

# Offense count: 77
# Configuration parameters: Prefixes.
# Offense count: 178
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Enabled: false

# Offense count: 287
# Configuration parameters: Max.
# Offense count: 1035
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Enabled: false
Max: 108

# Offense count: 36
# Configuration parameters: AggregateFailuresByDefault.
# Offense count: 688
RSpec/MultipleExpectations:
Max: 5

0 comments on commit 0bbd218

Please sign in to comment.