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

Enable changes related to frozen strings #497

Merged
merged 1 commit into from
Dec 18, 2023
Merged

Conversation

torrocus
Copy link
Member

@torrocus torrocus commented Dec 17, 2023

Pull Request Summary

I decided to use Rubocop autocorrect to enable frozen string literal in our files.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

Layout/EmptyLineAfterMagicComment: Add an empty line after magic comments.

Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.

Also, I disabled Style/RedundantFetchBlock because it conflicted with another linter.

Style/RedundantFetchBlock: Use fetch(..., ...) instead of fetch(...) { ... }.

There are a lot of changed files, but these changes are repeatable and should not affect the behavior of the application.

Feedback

N/A

UI Changes

N/A

@torrocus torrocus added the ruby Pull requests that update Ruby code label Dec 17, 2023
@torrocus torrocus requested a review from a team December 17, 2023 23:01
@torrocus torrocus force-pushed the al-frozen-string-literal branch from 887983b to 0371df9 Compare December 17, 2023 23:03
I decided to use Rubocop autocorrect to enable frozen string literal
in our files.

> Style/FrozenStringLiteralComment:
> Missing frozen string literal comment.

> Layout/EmptyLineAfterMagicComment:
> Add an empty line after magic comments.

> Style/RedundantFreeze:
> Do not freeze immutable objects, as freezing them has no effect.

Also, I disabled `Style/RedundantFetchBlock`
because it conflicted with another linter.

> Style/RedundantFetchBlock:
> Use fetch(..., ...) instead of fetch(...) { ... }.

There are a lot of changed files, but these changes are repeatable
and should not affect the behavior of the application.
@torrocus torrocus force-pushed the al-frozen-string-literal branch from 0371df9 to 69784c8 Compare December 17, 2023 23:15
@torrocus torrocus merged commit 6c6279c into main Dec 18, 2023
13 checks passed
@torrocus torrocus deleted the al-frozen-string-literal branch December 18, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants