Skip to content

Mark RSpec/IncludeExamples as SafeAutoCorrect: false #2089

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yujideveloper
Copy link
Contributor

@yujideveloper yujideveloper commented May 28, 2025

resolves #2083


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

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

If you have modified an existing cop's configuration options:

  • Set VersionChanged: "<<next>>" in config/default.yml.

@yujideveloper yujideveloper force-pushed the fix/mark-unsafe-autocorrect-for-include_examples branch from 9532274 to 1cb4761 Compare May 28, 2025 11:16
@yujideveloper yujideveloper marked this pull request as ready for review May 28, 2025 11:19
@yujideveloper yujideveloper requested a review from a team as a code owner May 28, 2025 11:20
@bquorning
Copy link
Collaborator

@pirj ?

@pirj
Copy link
Member

pirj commented May 28, 2025 via email

@koic
Copy link
Member

koic commented May 28, 2025

It would probably be appropriate to document the safety concerns using @safety. e.g.,
https://github.com/rubocop/rubocop-rspec/blob/v3.6.0/lib/rubocop/cop/rspec/expect_change.rb#L13-L30

@yujideveloper yujideveloper force-pushed the fix/mark-unsafe-autocorrect-for-include_examples branch 2 times, most recently from 23bfec6 to 97becec Compare May 29, 2025 03:15
@yujideveloper yujideveloper force-pushed the fix/mark-unsafe-autocorrect-for-include_examples branch from 97becec to 096bedf Compare May 29, 2025 03:21
@yujideveloper
Copy link
Contributor Author

@koic @pirj @bquorning
Thank you for your review.
I've updated the document the safety concerns using @safety.

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.

RSpec/IncludeExamples is not safe to auto-correct
4 participants