Skip to content

Conversation

@ericproulx
Copy link
Contributor

Update RuboCop to 1.81.7 and Fix Style Offenses

Summary

This PR updates RuboCop and related gems to their latest versions and fixes style offenses identified by the updated linter.

Changes

Dependency Updates

  • RuboCop: 1.76.21.81.7
  • rubocop-performance: 1.25.01.26.1
  • rubocop-rspec: 3.6.03.8.0

Code Style Fixes

  • Added blank lines after extend Forwardable declarations (RuboCop style requirement)
    • lib/grape/api.rb
    • lib/grape/api/instance.rb
    • lib/grape/middleware/stack.rb
    • lib/grape/util/cache.rb
  • Added blank lines after module/class declarations in specs
    • spec/grape/api/deeply_included_options_spec.rb
    • spec/grape/api/nested_helpers_spec.rb
    • spec/grape/api_spec.rb
    • spec/grape/dsl/parameters_spec.rb
    • spec/grape/validations/params_documentation_spec.rb
    • spec/grape/validations_spec.rb
  • Simplified destructuring pattern in spec/grape/validations/params_scope_spec.rb

RuboCop Todo Updates

  • Regenerated .rubocop_todo.yml with RuboCop 1.81.7
  • Reduced offense counts in several categories:
    • RSpec/RepeatedExampleGroupDescription: 10 → 8 offenses
    • RSpec/StubbedMock: 4 → 2 offenses
    • RSpec/SubjectStub: 118 → 32 offenses (significant improvement!)
    • RSpec/VerifiedDoubles: 22 → 20 offenses
  • Added new exclusion for RSpec/LeakyLocalVariable (1 offense)

Impact

  • No breaking changes: All changes are style-only
  • Improved code quality: Reduced RuboCop offenses, particularly in RSpec specs
  • Up-to-date tooling: Using latest RuboCop version with improved checks

Testing

  • All existing tests should continue to pass
  • RuboCop runs cleanly with the updated configuration

@ericproulx ericproulx merged commit c3ab82f into master Nov 15, 2025
103 checks passed
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 this pull request may close these issues.

3 participants