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

[Feature request] Check for all ruby files to have frozen_string_literal pragma #800

Open
alfuken opened this issue Nov 22, 2022 · 2 comments

Comments

@alfuken
Copy link

alfuken commented Nov 22, 2022

I've tried searching for this one through the project but to no avail. Hence the feature request: it [w|c]ould be a good idea to add a check for presence of frozen_string_literal pragma either in all ruby files or only in new ruby files that go through the git hooks pipeline.

I know about the "if you want it - make a PR" rule, and, although this doesn't look like a very complicated check to implement, I'm not yet that familiar with Overcommit, and I think that for someone more experienced with all this it would take much less time to implement, than for someone new. But, if no one will, I guess I'll probably get to it, eventually.

@hobbypunk90
Copy link

@alfuken
Copy link
Author

alfuken commented Feb 8, 2023

There is a rubocop cop for that :)

https://docs.rubocop.org/rubocop/cops_style.html#stylefrozenstringliteralcomment

True, but I do have mixed feelings towards rubocop - it's waaay too opinionated, and most of it (especially in style and metrics area) is a matter not of objective value, but merely of subjective personal preference, which they're trying to, by default, bestow upon others (and trying to turn ruby into a python along the way, with it's disdain towards TIMTOWTDI).

Also, that's Yet-Another/One-More Tool to add for something as simple as this... It's like using kubernetes to host a SPA - trendy, hypey, but not practical ;)

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

No branches or pull requests

2 participants