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
Refactor spec use expect_correction in Lint cops #8285
Refactor spec use expect_correction in Lint cops #8285
Conversation
Use newer expect_correction API in Lint namespace cops. Move expected corrections to directly follow expected offenses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, very impressive PR 💪! The result look so much better 😄
Here are a few things I noticed, but I'm too tired to really go through it tonight...
Tangential: created #8286 |
Use expect_offense etc directly in each test case.
I'm going to go with matching the |
Be consistent within UnusedMethodArgument and UnusedBlockArgument specs by defining the offense message just before the code.
💪 Lots of great work in there, thanks! 🎉 Result looks super clean. Great job. BTW, we can now abbreviate the error messages with |
Thanks @marcandre. I'm going to take a look at the style namespace cops this weekend (probably split into ranges to keep PR size reasonable). I'll make use of the |
Part of #8127
Use newer expect_correction API in Lint namespace cops.
Move expected corrections to directly follow expected offenses.
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 RuboCop for itself, and generates the documentation.