rubocop / rubocop-rspec

Code style checking for RSpec files.
https://docs.rubocop.org/rubocop-rspec
MIT License
794 stars 272 forks source link

Fix an edge offense for `Style/SymbolProc` #1881

Closed ydah closed 1 month ago

ydah commented 1 month ago

see: https://github.com/rubocop/rubocop-rspec/actions/runs/9147530544/job/25149073488?pr=1876

Inspecting 272 files
.................................................................................C..............................................................................................................................................................................................

Offenses:

lib/rubocop/cop/rspec/multiple_expectations.rb:[7](https://github.com/rubocop/rubocop-rspec/actions/runs/9147530544/job/25149073488?pr=1876#step:5:8)5:25: C: [Correctable] Style/SymbolProc: Pass &:true_type? as an argument to lambda instead of a block.
        TRUE = ->(node) { node.true_type? }
                        ^^^^^^^^^^^^^^^^^^^

272 files inspected, 1 offense detected, 1 offense autocorrectable
Error: Process completed with exit code 1.

Before submitting the PR make sure the following are checked: