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

Should we enable the FrozenStringLiteralComment lint? #625

Closed
mokagio opened this issue Jan 8, 2025 · 1 comment · Fixed by #626
Closed

Should we enable the FrozenStringLiteralComment lint? #625

mokagio opened this issue Jan 8, 2025 · 1 comment · Fixed by #626

Comments

@mokagio
Copy link
Contributor

mokagio commented Jan 8, 2025

While working on a private projects, we noticed that .rubocop.yml disables the FrozenStringLiteralComment lint.

There is a rationale for that setting, but I wonder whether it's time to reconsider it and adopt the standard.

One case against it is that we don't know what Fastlane might be doing under the hood to the constants we pass it. We even run into at least one instance of a crash due to that, see wordpress-mobile/WordPress-iOS#18417. Even with that, I still think we'd be better off enabling the lint and discover and fix possible issues in the tooling.

What do you think?

@AliSoftware
Copy link
Contributor

AliSoftware commented Jan 8, 2025

I say let's give it a try.

There's indeed a risk that doing so would make some actions to crash because their implementations assumed mutability of some variables (recent example of similar case: p1736258590769169-slack-C029BMLUGRX).

But at the same time we won't find those instances until we try to unable FrozenStringLiterals to surface those.

So I say at some point we're gonna have to take a deep breath and be ready to "move fast and break things" rather than never doing it out of extra caution and fear of introducing crashes (which should be easy to fix quickly … but will still temporarily create annoyances and blockers for eg devs doing release management if they see their MC releases CI jobs fail due to that and will have to ping us to unblock them, which is the reason why we refrained for attempting this change so far, but gotta take the jump at some point anyway)

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 a pull request may close this issue.

2 participants