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

Add autocorrect support for RSpec/ScatteredSetup #1616

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

ydah
Copy link
Member

@ydah ydah commented Apr 6, 2023

This PR adds autocorrect support for RSpec/ScatteredSetup

In #1611 . I'd like to add support for automatic correction that causes RSpec/Rails/TravelAround cop to triggerRSpec/ScatteredSetup. WDYT?


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.

Nice!
This is what teamwork is:

  before { foo }
  before { bar }
  after { zoo }
  before { baz }
  it { aaa }
  before do
    foo
    bar
    baz
  end

  after { zoo }

  it { aaa }

CHANGELOG.md Outdated Show resolved Hide resolved
@ydah ydah force-pushed the add-autocorrect-for-ScatteredSetup branch from 53dfe8e to 62623d5 Compare April 12, 2023 12:15
This PR adds autocorrect support for `RSpec/ScatteredSetup`

In rubocop#1611

I'd like to add support for automatic correction that causes `RSpec/Rails/TravelAround` cop
to trigger`RSpec/ScatteredSetup`. WDYT?
@ydah ydah force-pushed the add-autocorrect-for-ScatteredSetup branch from 62623d5 to 9255370 Compare April 13, 2023 02:03
@pirj pirj merged commit d3430b7 into rubocop:master Apr 14, 2023
23 checks passed
@pirj
Copy link
Member

pirj commented Apr 14, 2023

Thank you!

@ydah ydah deleted the add-autocorrect-for-ScatteredSetup branch April 14, 2023 09:55
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.

None yet

3 participants