-
-
Notifications
You must be signed in to change notification settings - Fork 0
Replace StandardRB with RuboCop and configure for double-quoted strings #56
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
Conversation
- Remove standard gem and add rubocop gem to Gemfile - Create comprehensive .rubocop.yml configuration with: - Double-quoted strings (EnforcedStyle: double_quotes) - Relaxed RSpec cops for integration tests (Max 5 expectations, 10 lines) - Disabled IndexedLet cop (mod1, mod2 are clear in test context) - Reasonable metrics thresholds (AbcSize: 35, MethodLength: 20) - Disabled ActiveRecord-specific cops (we use Firestore) - Update bin/audit to use 'rubocop --parallel' instead of standardrb - Remove .standard.yml and .standard_rubocop_extensions.yml - Auto-correct 1049+ style violations across 63 files - Rename spec/helpers/mods_helper_spec.rb → mod_helper_spec.rb - Fix test failures from RuboCop's ActiveRecord optimizations All audits passing: - bundle-audit: No vulnerabilities - brakeman: No security warnings - rubocop: 63 files inspected, no offenses detected - rspec: 222 examples, 0 failures Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces StandardRB with RuboCop to allow for customized linting rules and double-quoted string preference. The configuration is comprehensive and appropriate for a Rails application using Firestore instead of ActiveRecord.
Changes:
- Removed StandardRB gem and configuration files, added RuboCop with plugins for Rails, RSpec, and performance
- Created
.rubocop.ymlwith sensible defaults including double-quoted strings, relaxed RSpec cops, and disabled ActiveRecord-specific cops - Auto-corrected 1049+ style violations across spec files and application code including frozen string literals, block syntax, hash spacing, and indentation
Reviewed changes
Copilot reviewed 26 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .rubocop.yml | New RuboCop configuration with Rails and RSpec-friendly settings |
| Gemfile | Removed standard gem, added rubocop and related plugins |
| Gemfile.lock | Updated dependencies, including rubocop-rspec v2→v3 upgrade |
| bin/audit | Updated to run rubocop --parallel instead of standardrb |
| .standard.yml, .standard_rubocop_extensions.yml | Removed StandardRB config files |
| .claude/settings.local.json | Added Claude Code permissions (contains outdated standardrb reference) |
| Rakefile, Guardfile | Added frozen_string_literal comments |
| Gemfile | Added frozen_string_literal comment |
| spec/**/* | Auto-corrected: frozen_string_literal, block syntax (do/end), hash spacing, expect blocks |
| app/models/*.rb | Auto-corrected: line breaking for long constants, rescue clause formatting |
| app/controllers/*.rb | Auto-corrected: hash spacing, line breaking, empty method syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.claude/settings.local.json
Outdated
| "Bash(then bin/spring stop)", | ||
| "Bash(else echo \"No Spring\")", | ||
| "Bash(fi)", | ||
| "Bash(bundle exec standardrb:*)", |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This permissions entry still references StandardRB, which has been replaced with RuboCop in this PR. Since StandardRB is no longer used, this permission should be removed to keep the configuration consistent.
| "Bash(bundle exec standardrb:*)", |
The .claude/ directory contains user-specific Claude Code settings (permission allowlists, etc.) and should not be version controlled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 28 out of 32 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Replaced StandardRB with RuboCop using a sensible configuration that prefers double-quoted strings and includes reasonable thresholds for Rails applications.
Changes
rubocopgem.rubocop.ymlwith:EnforcedStyle: double_quotes)RSpec/IndexedLet(variables likemod1,mod2are clear in test context)Rails/FindEach,Rails/RedundantActiveRecordAllMethod)bin/auditto runrubocop --parallelinstead ofstandardrb.standard.ymland.standard_rubocop_extensions.ymlspec/helpers/mods_helper_spec.rb→spec/helpers/mod_helper_spec.rbto match helper nameVerification
All audits and tests passing:
Why This Change?
StandardRB is intentionally opinionated and doesn't allow customization of cop thresholds, which made it incompatible with our testing patterns (integration tests naturally have multiple expectations) and string literal preferences (double quotes). RuboCop provides the flexibility we need while maintaining code quality standards.
🤖 Generated with Claude Code