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

False negative for Layout/LineLength with split heredoc #12830

Open
andyw8 opened this issue Apr 10, 2024 · 0 comments
Open

False negative for Layout/LineLength with split heredoc #12830

andyw8 opened this issue Apr 10, 2024 · 0 comments

Comments

@andyw8
Copy link
Contributor

andyw8 commented Apr 10, 2024

Expected behavior

Given this code, and max line length set to 120:

x = <<~FOO
  a \
  abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef abcdef
FOO

RuboCop should complain with Layout/LineLength: Line is too long. [127/120].

Actual behavior

RuboCop doesn't complain. But if I set ParserEngine: parser_prism, then it correctly reports the issue.

RuboCop version

Include the output of rubocop -V or bundle exec rubocop -V if using Bundler.
If you see extension cop versions (e.g. rubocop-performance, rubocop-rspec, and others)
output by rubocop -V, include them as well. Here's an example:

$ [bundle exec] rubocop -V
1.63.1 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-linux]
  - rubocop-performance 1.18.0
  - rubocop-rspec 2.23.2
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

No branches or pull requests

1 participant