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

rubocop: Enable RSpec/ContextWording cop & fix offenses #10658

Merged
merged 5 commits into from
Feb 23, 2021

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Feb 19, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

  • This was TODO, so I thought I'd do it.
  • Most interesting is probably the last commit where I disabled the cop for three out of 150 surfaced problems.

- 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.
@BrewTestBot
Copy link
Member

Review period will end on 2021-02-22 at 23:33:16 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 19, 2021
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

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 😅

@issyl0
Copy link
Member Author

issyl0 commented Feb 21, 2021

@Rylan12 Thanks, how does the latest commit look?

- We could have added "to" to the `RSpec/ContextWording` list of valid
  `context` prefixes, but switching these to `describe` is less special.
@issyl0 issyl0 force-pushed the rubocop-enable-rspec-context-wording branch from 0c5289f to 5793be5 Compare February 21, 2021 13:34
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks, @issyl0!

@MikeMcQuaid
Copy link
Member

Thanks again @issyl0!

@issyl0 issyl0 enabled auto-merge February 22, 2021 15:17
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 23, 2021
@BrewTestBot
Copy link
Member

Review period ended.

@issyl0 issyl0 merged commit e143dfd into Homebrew:master Feb 23, 2021
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Mar 26, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Mar 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants