chore: add frozen_string_literal to all Ruby files#216
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request standardizes the inclusion of the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
73c4eaf to
63d1da4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 26 26
Lines 571 571
=======================================
Hits 569 569
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request adds the # frozen_string_literal: true magic comment to multiple Ruby files. My review focuses on an inconsistency introduced in one of the files where string literals were changed from double to single quotes, while other files were not updated similarly. I've suggested reverting this part of the change to maintain a consistent style and to keep the pull request focused on a single concern. The style change for string quotes could be handled in a separate, more comprehensive pull request.
| PROVIDER_NOT_READY = 'PROVIDER_NOT_READY' | ||
| FLAG_NOT_FOUND = 'FLAG_NOT_FOUND' | ||
| PARSE_ERROR = 'PARSE_ERROR' | ||
| TYPE_MISMATCH = 'TYPE_MISMATCH' | ||
| TARGETING_KEY_MISSING = 'TARGETING_KEY_MISSING' | ||
| INVALID_CONTEXT = 'INVALID_CONTEXT' | ||
| PROVIDER_FATAL = 'PROVIDER_FATAL' | ||
| GENERAL = 'GENERAL' |
There was a problem hiding this comment.
While using single quotes for frozen strings is good practice, this change introduces an inconsistency as other files with constants (e.g., lib/open_feature/sdk/provider/reason.rb) were not updated. To keep this PR focused on adding frozen_string_literal, it would be better to revert this change and address string quoting style across the project in a separate PR.
PROVIDER_NOT_READY = "PROVIDER_NOT_READY"
FLAG_NOT_FOUND = "FLAG_NOT_FOUND"
PARSE_ERROR = "PARSE_ERROR"
TYPE_MISMATCH = "TYPE_MISMATCH"
TARGETING_KEY_MISSING = "TARGETING_KEY_MISSING"
INVALID_CONTEXT = "INVALID_CONTEXT"
PROVIDER_FATAL = "PROVIDER_FATAL"
GENERAL = "GENERAL"63d1da4 to
6aae28b
Compare
Add `# frozen_string_literal: true` to the 13 .rb files that were missing it, for consistency across the codebase and to opt into frozen string semantics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jose Colella <jose.colella@gusto.com>
Include commit signing requirement and development commands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jose Colella <jose.colella@gusto.com>
Also correct CLAUDE.md to document that Standard Ruby enforces double-quoted strings, not single-quoted. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jose Colella <jose.colella@gusto.com>
bafbb57 to
786b9eb
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jose Colella <jose.colella@gusto.com>
Signed-off-by: Jose Miguel Colella <josecolella@yahoo.com>
Summary
# frozen_string_literal: truemagic comment to the 13.rbfiles that were missing it (10 inlib/, 3 inspec/).rbfiles in the codebase now consistently have the commentTest plan
bundle exec rspec— 272 examples, 0 failuresgrep -rL 'frozen_string_literal' --include='*.rb' .— no files missing🤖 Jose's AI agent