-
Notifications
You must be signed in to change notification settings - Fork 111
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add frozen_string_literal Rubocop Rule #10342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! It's a good thing we don't have a "last person to touch a file is its owner" rule! 馃槈
This is a big commit--can you point out where the rubocop rule is enabled? I'm not seeing any references to it |
b9f2269
to
2cd0652
Compare
Ah NM I found it |
1cba376
to
3e4ebfe
Compare
changelog: Internal, Performance, Add frozen_string_literal Rubocop Rule
f8a7926
to
07d721c
Compare
Style/FrozenStringLiteralComment: | ||
Enabled: true | ||
Exclude: | ||
- 'spec/**/*.rb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be any similar benefit to extending this to spec files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm speculating, but I'd guess no. It can be helpful to freeze strings for performance purposes, but the impact is usually smaller, so I'm not sure how big of an impact it would have on tests.
馃洜 Summary of changes
Spurred by conversation on #10340 here, this PR enables the frozen_string_literal rule with a few exceptions.