Skip to content

fix(perl): escape heredoc in mojolicious detector spec#1347

Merged
hahwul merged 1 commit intomainfrom
fix/perl-mojolicious-heredoc
May 6, 2026
Merged

fix(perl): escape heredoc in mojolicious detector spec#1347
hahwul merged 1 commit intomainfrom
fix/perl-mojolicious-heredoc

Conversation

@hahwul
Copy link
Copy Markdown
Member

@hahwul hahwul commented May 6, 2026

Summary

  • ameba's new Style/HeredocEscape rule flagged the plain-perl heredoc in mojolicious_spec.cr because it contained \n
  • Switch the marker to <<-'PERL' and store the literal escape sequence — the test only checks for the absence of Mojolicious markers, so the surrounding string content is unaffected

Test plan

  • crystal lib/ameba/bin/ameba.cr (706 inspected, 0 failures)
  • crystal spec spec/unit_test/detector/perl/mojolicious_spec.cr (6 examples, 0 failures)

ameba's new Style/HeredocEscape rule flagged the heredoc that contained
\n: switch the marker to <<-'PERL' and store the literal escape.
@hahwul hahwul merged commit d929930 into main May 6, 2026
@hahwul hahwul deleted the fix/perl-mojolicious-heredoc branch May 6, 2026 14:47
@github-actions github-actions Bot added the 💊 spec Issue for test codes label May 6, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Perl Mojolicious detector specifications by switching to a non-interpolated heredoc for the plain Perl test case. This change simplifies the string representation of the Perl script by allowing the use of a single backslash for the newline character. I have no feedback to provide as no review comments were submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💊 spec Issue for test codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant