豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

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

Merged
jdennes merged 4 commits intomainfrom
jdennes/fix-render-literal-cop-message
Jul 18, 2024
Merged

RuboCop::Cop::GitHub::RailsControllerRenderLiteral: Make error message helpful for locals offence#183
jdennes merged 4 commits intomainfrom
jdennes/fix-render-literal-cop-message

Conversation

@jdennes
Copy link
Copy Markdown
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
Copy Markdown
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
@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