rubocop: Enable RSpec/ContextWording cop & fix offenses#10658
Merged
issyl0 merged 5 commits intoHomebrew:masterfrom Feb 23, 2021
Merged
rubocop: Enable RSpec/ContextWording cop & fix offenses#10658issyl0 merged 5 commits intoHomebrew:masterfrom
issyl0 merged 5 commits intoHomebrew:masterfrom
Conversation
- For some of these I changed `context` to `describe` as it fit better rather than contriving a "when", "with" or "without", or massively restructuring the tests.
- I couldn't figure out a way to start these with "when", "with" or "without" given where these are in cop descriptions. Three ignored things out of 150 problems is a good ratio though.
Contributor
|
Review period will end on 2021-02-22 at 23:33:16 UTC. |
This was referenced Feb 20, 2021
Co-authored-by: Nanda H. Krishna <nanda.harishankar@gmail.com>
Rylan12
approved these changes
Feb 20, 2021
Member
Rylan12
left a comment
There was a problem hiding this comment.
🎉
I pointed out a few places where I think the wording is sub-optimal (just due to the constraints of the cop rules). I don't think any of them are unclear so I wouldn't bother changing unless anyone has a good idea for how to do it. I couldn't think of any, so I definitely won't complain 😅
Member
Author
|
@Rylan12 Thanks, how does the latest commit look? |
Rylan12
reviewed
Feb 21, 2021
- We could have added "to" to the `RSpec/ContextWording` list of valid `context` prefixes, but switching these to `describe` is less special.
0c5289f to
5793be5
Compare
MikeMcQuaid
approved these changes
Feb 22, 2021
Member
|
Thanks again @issyl0! |
Contributor
|
Review period ended. |
BrewTestBot
approved these changes
Feb 23, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Have you written new tests for your changes? Here's an example.brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?brew manlocally and committed any changes?