Skip to content

Commit

Permalink
Lint/UnusedMethodArgument
Browse files Browse the repository at this point in the history
This cop flags methods where `&block` is passed to a method, which is a very
common practice. There's also debate[1] as to whether specifying `&block`
explicitly is better than implicitly accepting a block.

[1] rubocop/rubocop-performance#385
  • Loading branch information
joshcooper committed Dec 6, 2023
1 parent 3b981fe commit b9b9076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Lint/BooleanSymbol:
- 'lib/puppet/reference/providers.rb'
- 'lib/puppet/parameter/value.rb'

# This breaks the ruby convention of passing &block and using block_given?
Lint/UnusedMethodArgument:
Enabled: false

Metrics/AbcSize:
Enabled: false

Expand Down
5 changes: 0 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,6 @@ Lint/SuppressedException:
- 'lib/puppet/util/execution.rb'
- 'util/rspec_grouper'

# This cop supports safe auto-correction (--auto-correct).
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
Lint/UnusedMethodArgument:
Enabled: false

Naming/AccessorMethodName:
Enabled: false

Expand Down

0 comments on commit b9b9076

Please sign in to comment.