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
Mark autocorrection for Lint/UnusedMethodArgument as unsafe #11020
Conversation
1b2bcc9
to
b370b49
Compare
This should be changed to make |
@koic I'm re-opening this for consideration, as I don't believe autocorrection can handle all of the potential issues. I began working on |
b370b49
to
91e75c2
Compare
RuboCop supports vanilla Ruby and should not be affected by specifications of third party products as much as possible. For example, Rails-specific behavior was extracted to RuboCop Rails. This proposal will be close because I'm concerned that handling such potential changes as unsafe by default of RuboCop core will result in no safe cop. |
Hi @koic, thanks for your reply and your contributions to rubocop and the larger Ruby ecosystem. Fwiw this also potentially breaks code that follows official Ruby libraries, such as corresponding RBS annotations. Ultimately, imo, |
@dduugg Feel free to open a discussion for the safety topic and its standards. For me that's a more important topic than the safety of any particular cop. We acknowledge there's always room for improvement. |
I couldn't find a new discussion point that was opened up, so just adding an extra datapoint/plus one to the |
Renaming a method argument will break code with Sorbet type signatures, e.g.
becomes
which will fail to typecheck, as well as resulting in a
RuntimeError
on method invocation.(I used #10867 as a template for creating this PR)
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.