fix(perl): escape heredoc in mojolicious detector spec#1347
Merged
Conversation
ameba's new Style/HeredocEscape rule flagged the heredoc that contained \n: switch the marker to <<-'PERL' and store the literal escape.
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Style/HeredocEscaperule flagged the plain-perl heredoc inmojolicious_spec.crbecause it contained\n<<-'PERL'and store the literal escape sequence — the test only checks for the absence of Mojolicious markers, so the surrounding string content is unaffectedTest 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)