-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Cop idea: replace #strip_heredoc
with squiggly heredoc in heredoc declarations
#704
Labels
feature request
Request for new functionality
Comments
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 27, 2022
Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 27, 2022
Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 27, 2022
Closes rubocop#704. Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
10 tasks
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 27, 2022
Closes rubocop#704. Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS # bad <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 28, 2022
Closes rubocop#704. Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS # bad <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 28, 2022
Closes rubocop#704. Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS # bad <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
May 30, 2022
Closes rubocop#704. Enforces the use of squiggly heredoc over `strip_heredoc`. ```ruby # bad <<EOS.strip_heredoc some text EOS # bad <<-EOS.strip_heredoc some text EOS # good <<~EOS some text EOS ```
koic
added a commit
that referenced
this issue
Jun 12, 2022
[Fix #704] Add new `Rails/StripHeredoc` cop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
ruby>=2.3 has squiggly heredoc (
<<~
) which does the same as Rails#strip_heredoc
method.Describe the solution you'd like
Would be good to have a cop that suggests/autofixes code that using
<<-TEXT.strip_heredoc
-><<~TEXT
.Describe alternatives you've considered
/shrug
Additional context
The text was updated successfully, but these errors were encountered: