Skip to content

Linter Rule: Remove Trimming with -%> on non-output offense#645

Merged
marcoroth merged 2 commits intomainfrom
erb-right-trim-remove-right-trimming-non-output-message
Oct 15, 2025
Merged

Linter Rule: Remove Trimming with -%> on non-output offense#645
marcoroth merged 2 commits intomainfrom
erb-right-trim-remove-right-trimming-non-output-message

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Oct 15, 2025

This pull request removes the following offense from the erb-right-trim linter rule, as it's not right and does have an effect:

Right-trimming with `-%>` has no effect on non-output ERB tags. Use `%>` instead.

It will have an effect on templates like this:

<% if true -%>
  <h1>Content</h1>
<% end -%>

@marcoroth marcoroth added bug Something isn't working linter linter-rule labels Oct 15, 2025
@marcoroth marcoroth changed the title Linter Rule: Remove 'Trimming with -%> on non-output' offense Linter Rule: Remove `Trimming with -%> on non-output' offense Oct 15, 2025
@marcoroth marcoroth changed the title Linter Rule: Remove `Trimming with -%> on non-output' offense Linter Rule: Remove Trimming with -%> on non-output offense Oct 15, 2025
@marcoroth marcoroth merged commit 13a6b45 into main Oct 15, 2025
7 checks passed
@marcoroth marcoroth deleted the erb-right-trim-remove-right-trimming-non-output-message branch October 15, 2025 10:02
asilano pushed a commit to fac/herb that referenced this pull request Oct 21, 2025
…oth#645)

This pull request removes the following offense from the
`erb-right-trim` linter rule, as it's not right and does have an effect:

```
Right-trimming with `-%>` has no effect on non-output ERB tags. Use `%>` instead.
```

It will have an effect on templates like this:

```erb
<% if true -%>
  <h1>Content</h1>
<% end -%>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working linter linter-rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant