Add rubocop, and switch to Prism#30
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request modernizes the i18nliner gem by migrating from the deprecated ruby_parser to Prism for Ruby code parsing, adding RuboCop for code quality enforcement, and raising the minimum Ruby version requirement from 2.7 to 3.2. The changes include comprehensive code style improvements following RuboCop conventions, spec file reorganization into a more standard directory structure, and various refactorings to use more modern Ruby idioms.
Changes:
- Migrated from ruby_parser gem to Prism's RubyParser compatibility layer for parsing Ruby code
- Added RuboCop with rubocop-inst, rubocop-rake, and rubocop-rspec configurations
- Updated minimum Ruby version to 3.2 and CI matrix to test against Ruby 3.2, 3.3, 3.4, and 4.0
- Refactored codebase following RuboCop style guidelines (frozen_string_literal, modern hash syntax, etc.)
- Reorganized spec files from flat structure to nested i18nliner/ directory
- Added bin/ scripts for rubocop, rspec, and rake
Reviewed changes
Copilot reviewed 56 out of 61 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| i18nliner.gemspec | Updated dependencies (prism instead of ruby_parser), raised Ruby requirement to 3.2, added rubocop dependencies |
| lib/i18nliner/processors/ruby_processor.rb | Switched from RubyParser to Prism::Translation::RubyParser for parsing |
| lib/i18nliner/extractors/ruby_extractor.rb | Updated to work with Prism's S-expression output |
| lib/i18nliner/pre_processors/erb_pre_processor.rb | Migrated parser to Prism, refactored with modern Ruby patterns |
| lib/i18nliner/extensions/inferpolation.rb | Refactored inferpolation logic (contains bug in hash handling) |
| lib/i18nliner/extractors/translate_call.rb | Refactored validation logic (contains logic error) |
| lib/**/*.rb | Applied RuboCop style fixes: frozen_string_literal, modern hash syntax, string interpolation, etc. |
| spec/**/*_spec.rb | Reorganized into spec/i18nliner/ structure, updated to modern RSpec style |
| .rubocop.yml | Added RuboCop configuration inheriting from rubocop-inst |
| .github/workflows/push.yml | Updated CI to test Ruby 3.2-4.0 and run rubocop |
| Gemfile | Added development dependencies, modernized syntax |
| bin/* | Added binstubs for rubocop, rspec, and rake |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
the former is deprecated, and the latter has a perfect compatibility mode for the former
spencerolson
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Switch from ruby_parser to prism. The former is deprecated, and the latter has a perfect compatibility mode for the former. But first clean up the code base with rubocop, and raise minimum requirements.