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/performance/inefficient_hash_search.rb:88:78: C: InternalAffairs/CopEnabled:
Consider replacing uses of preferred_config with config.for_enabled_cop.
          preferred_config && preferred_config['EnforcedStyle'] == 'long' && preferred_config['Enabled']
                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

120 files inspected, 1 offense detected
```

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 9248192 commit 9aef9ac
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-07-27 22:39:00 +0800 using RuboCop version 0.73.0.
# on 2024-12-13 20:34:48 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: 1
# This cop supports safe autocorrection (--autocorrect).
InternalAffairs/CopEnabled:
Exclude:
- 'lib/rubocop/cop/performance/inefficient_hash_search.rb'

# Offense count: 12
InternalAffairs/NodeDestructuring:
Exclude:
Expand All @@ -15,25 +21,25 @@ InternalAffairs/NodeDestructuring:
- 'lib/rubocop/cop/performance/regexp_match.rb'
- 'lib/rubocop/cop/performance/string_replacement.rb'

# Offense count: 3
InternalAffairs/NumblockHandler:
Enabled: false

# Offense count: 8
Metrics/AbcSize:
Max: 17
Exclude:
- 'lib/rubocop/cop/performance/compare_with_block.rb'
- 'lib/rubocop/cop/performance/redundant_equality_comparison_block.rb'
- 'lib/rubocop/cop/performance/sum.rb'

# Offense count: 2
# Configuration parameters: CountComments.
# Offense count: 4
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 164
Max: 159

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

# Offense count: 40
# Configuration parameters: Prefixes.
# Offense count: 38
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
Expand All @@ -47,12 +53,11 @@ RSpec/ContextWording:
- 'spec/rubocop/cop/performance/string_replacement_spec.rb'
- 'spec/rubocop/cop/performance/times_map_spec.rb'

# Offense count: 89
# Configuration parameters: Max.
# Offense count: 388
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Enabled: false
Max: 24

# Offense count: 26
# Configuration parameters: AggregateFailuresByDefault.
# Offense count: 312
RSpec/MultipleExpectations:
Max: 7
Max: 3

0 comments on commit 9aef9ac

Please sign in to comment.