Skip to content

Conversation

@ydah
Copy link
Member

@ydah ydah commented Nov 15, 2025

  • Avoid using “Check ..."
  • Unify the style of example

Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • Updated documentation.
  • [-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

…op files

- Avoid using “Check ..."
- Unify the style of example
@ydah ydah requested a review from a team as a code owner November 15, 2025 06:56

RSpecRails/AvoidSetupHook:
Description: Checks that tests use RSpec `before` hook over Rails `setup` method.
Description: Prefer RSpec `before` hook over Rails `setup` method.
Copy link
Member

Choose a reason for hiding this comment

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

I’m uncertain if “prefer” is correct here. Two reasons off the top of my head:

  1. I recall that in the Ruby Style guide, editors avoid soft wording like “recommend”, “prefer” or “advise”, and use more insistent terms
  2. The “description” should answer the “what it does” question. With “prefer”, it answers to “what the code should adhere to?”

Please donn’t take this note as a request or call to action, I just spark a discussion, and would like to have more input.

A brief look at https://docs.rubocop.org/rubocop/1.81/cops_layout.html#layoutarrayalignment shows that cops do use “Checks if …”

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

Successfully merging this pull request may close these issues.

3 participants