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

Use squiggly heredocs wherever possible #1761

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Use squiggly heredocs wherever possible #1761

merged 2 commits into from
Jan 3, 2024

Conversation

bquorning
Copy link
Collaborator

Most new code uses the squiggly heredoc, but in a lot of places we were still using the "old" <<- heredoc.

I have seen pull requests changing the heredoc style from <<- to <<~ and I don't like that :-) I prefer having style changes separate from "real" code changes.

I have not checked if any of the specs were actually relying on the leading spaces in heredoc content, so reviewers may need to take a quick glance at that.


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

Most new code uses the squiggly heredoc, but in a lot of places we were still
using the "old" `<<-` heredoc.

I have seen pull requests changing the heredoc style from `<<-` to `<<~` and I
don't like that :-) I prefer having style changes separate from  "real" code
changes.
@bquorning bquorning marked this pull request as ready for review January 3, 2024 16:43
@bquorning bquorning requested review from pirj and ydah January 3, 2024 16:44
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!

@bquorning bquorning merged commit 200d96f into master Jan 3, 2024
24 checks passed
@bquorning bquorning deleted the tilde-heredoc branch January 3, 2024 23:15
ydah added a commit to rubocop/rubocop-factory_bot that referenced this pull request Jan 4, 2024
ydah added a commit to rubocop/rubocop-capybara that referenced this pull request Jan 4, 2024
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.

2 participants