Skip to content

Conversation

@brymacto
Copy link

@brymacto brymacto commented May 3, 2025

Addresses #331.

This fixes a problem where erb like:

<%
  some_ruby_code
%>

Would result in the first line being considered a Layout/TrailingWhitespace offense. When used with --autocorrect, this would break the erb file by updating it to:

  some_ruby_code
%>

This fix will consider whether the source line is an erb tag only, and if so, not consider that a violation.

I'm not completely sure if this is the right fix or if there is a better fix that could be made at a different point, such as when parsing before trying to identify offenses. Very open to feedback if there are better approaches.

@brymacto
Copy link
Author

brymacto commented May 3, 2025

I have signed the CLA!

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