Skip to content

Update the herb PR #2260 comparison to rubocop-herb 24ec034 - #7

Merged
tk0miya merged 1 commit into
mainfrom
research/herb-pr2260-24ec034
Oct 30, 2026
Merged

tk0miya merged 1 commit into
mainfrom
research/herb-pr2260-24ec034

Conversation

@tk0miya

@tk0miya tk0miya commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rerun the comparison in research/herb-pr2260.md against tk0miya/rubocop-herb 24ec034 (latest main). The PR side (Ruby: Add RuboCop support for Ruby in ERB templates marcoroth/herb#2260 at d0323df) is unchanged
  • On the 333 real views, rubocop-herb now reports 935 offenses: Layout/LineLength is measured only on lines with ERB tags, and Layout/ElseAlignment / Layout/BlockEndNewline no longer fire across ERB tags. -a still changes the HTML of 0 files
  • Results on the repro samples and edge cases are unchanged; run times were re-measured under the same conditions
  • Update the clone commit and counts in the "herb PR #2260" section of research/repro/README.md

Revised evaluation of the offenses only rubocop-herb reports

  • Layout/LineLength (162): valid. 109 lines are long because of the Ruby inside ERB tags (fixable by RuboCop), and 53 because of the surrounding HTML (fixable by herb-format). herb-format defaults to maxLineLength: 80 while RuboCop defaults to 120. The autocorrect places %> at the start of a line
  • Lint/EmptyFile (16): valid. It fires only on 0-byte templates; the one in conference-app is an edit view whose route and controller action exist
  • Layout/EmptyLineAfterMagicComment (3): the magic comment detection is correct, but -a inserts a blank line and changes the template output
  • Naming/FileName (3): only the locale variant hello_world.pt-BR.html.erb is a false positive

🤖 Generated with Claude Code

Rerun the comparison with tk0miya/rubocop-herb 24ec034 and revise the
evaluation of the offenses only rubocop-herb reports: Layout/LineLength
and Lint/EmptyFile are valid, Layout/EmptyLineAfterMagicComment changes
the template output with -a, and Naming/FileName misreports locale
variants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tk0miya
tk0miya merged commit 158e250 into main Oct 30, 2026
@tk0miya
tk0miya deleted the research/herb-pr2260-24ec034 branch October 30, 2026 06:47
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.

1 participant