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

Layout/RescueEnsureAlignment continuation of #6254 #6771 #6818

Closed
wants to merge 2 commits into from

Conversation

formigarafa
Copy link

This PR fix unexpected issues with Layout/RescueEnsureAlignment raised by #6771.
By implementing the solution for the related problems one pre-existing spec come to fail but I am not so sure if that has to pass as is or if that simply highlight the existence of two other possible conflicting layouts for rescue that were not being considered.

a_variable = begin
               something
             rescue
               log_some_failure
             end
a_variable = begin
  something
rescue
  log_some_failure
end

One of these 2 cases passes and the other fail after my changes but none of them fail before. I don't know if one of those styles should be selected over the other or if they should be considered equivalent and keep passing without error.

Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@formigarafa
Copy link
Author

@Drenmi ,
Would I be correct to think that each of the styles I mentioned above would be defined by Layout/EndAlignment the same way as Layout/ElseAlignment does at https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/cop/layout/else_alignment.rb#L109 ???

@stale
Copy link

stale bot commented May 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale Issues that haven't been active in a while label May 8, 2019
@stale
Copy link

stale bot commented Jun 7, 2019

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

@stale stale bot closed this Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues that haven't been active in a while
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants