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

RuboCop::Cop::GitHub::RailsControllerRenderLiteral: Make error message helpful for locals offence #183

Merged
merged 4 commits into from
Jul 18, 2024

Conversation

jdennes
Copy link
Member

@jdennes jdennes commented Jul 17, 2024

The current message "render must be used with a string literal or an instance of a Class" is not helpful when you are passing a string literal, but the cop is really complaining about the locals keyword argument not using literals.

This makes the message helpful in that situation.

@jdennes jdennes self-assigned this Jul 17, 2024
@jdennes jdennes marked this pull request as ready for review July 17, 2024 14:58
@jdennes jdennes requested a review from a team as a code owner July 17, 2024 14:58
Copy link
Member

@issyl0 issyl0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jdennes jdennes merged commit c858bf9 into main Jul 18, 2024
6 checks passed
@jdennes jdennes deleted the jdennes/fix-render-literal-cop-message branch July 18, 2024 08:41
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.

2 participants