Activate frozen string literal cop #17481
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge, see disclaimer at the bottom.
As discussed in the dev weekly today (December 17, 2024), we want to activate frozen string literals for all of our files.
This PR does just that.
The cop is activated in strict mode, so
frozen_string_literal
must be there and on top of that, it must be set totrue
.After this PR has been merged, all new and modified files must follow the rule and include a magic comment activating frozen string literals. I intentionally did not update all files here as we have ~7.5k more rubocop offenses that come up after fixing this one rule. Since every file is modified, every file is checked. And we broke a lot of cops in the past 🫠 Fixing all at once is too risky. So we do this gradually.
Attention: intentionally set to draft. Do not merge before the next feature freeze (15.2). As of now, this means we can merge after December 20, 2024.