Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Performance/RedundantBlockCall to teach it about Sorbet sigs #200

Open
sambostock opened this issue Feb 14, 2024 · 1 comment
Open

Comments

@sambostock
Copy link
Contributor

We disable Performance/RedundantBlockCall because "[it] conflicts with Sorbet since we need to capture the block to type it."

There is precedent for RuboCop extensions patching cops defined somewhere else, and this seems like a reasonable thing to patch. If the method definition is prefixed with a sig, this cop should not complain about capturing the block argument, even if yield is used.

@sambostock
Copy link
Contributor Author

Another option would be to teach the cop about Sorbet upstream in rubocop-performance, but that is likely to be rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant