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

Ensure PendingWithoutReason can detect violations inside shared groups #1757

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

robinaugh
Copy link
Contributor

@robinaugh robinaugh commented Dec 27, 2023

This fixes #1756 by allowing PendingWithoutReason to flag violations that are inside shared groups (i.e. shared_examples).

I've confirmed that this change can also support the other edge case mentioned in #1756 (using Papertrail's with_versioning helper and other arbitrary blocks) if my project configuration is updated to map that helper as if it is a shared group, i.e.

RSpec:
  Language:
    SharedGroups:
      Examples:
        - with_versioning

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).

Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

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

Please add a changeling entry and this is good to go. Thank you!

Copy link
Member

@ydah ydah left a comment

Choose a reason for hiding this comment

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

Thank you!

@pirj pirj merged commit 16bd30f into rubocop:master Dec 29, 2023
22 checks passed
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.

PendingWithoutReason does not flag violations inside shared_examples and similar blocks
4 participants