Skip to content

Repository files navigation

gc_ruboconfig

Gem VersionTests

GoCardless's shared Rubocop configuration, conforming to our house style.

This gem provides a comprehensive set of Ruby style guidelines and linting rules, including support for:

  • Core Ruby best practices
  • RSpec testing conventions
  • Rails application patterns
  • Performance optimizations
  • Factory Bot usage

Installation

Add this line to your application's Gemfile:

gem'gc_ruboconfig'

Then execute:

bundle install

The following Rubocop plugins will be automatically installed as dependencies:

Usage

Basic Setup

Create a .rubocop.yml file in your project root and inherit from this gem:

inherit_gem:
gc_ruboconfig: rubocop.yml

Rails Projects

For Rails applications, also inherit the Rails-specific configuration:

inherit_gem:
gc_ruboconfig:
- rubocop.yml
- rails.yml

Capybara Testing

If you're using Capybara for integration testing, include the Capybara configuration:

inherit_gem:
gc_ruboconfig:
- rubocop.yml
- rails.yml
- capybara.yml

Sorbet Projects

For projects using Sorbet, you'll need to add rubocop-sorbet separately as it's not included in this gem:

# Gemfilegem'gc_ruboconfig'gem'rubocop-sorbet'
# .rubocop.ymlinherit_gem:
gc_ruboconfig: rubocop.ymlplugins:
- rubocop-sorbet

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines on contributing to this project.

Versioning

This gem follows semantic versioning. Breaking changes to Rubocop rules will result in a major version bump.

License

The gem is available as open source under the terms of the Apache License 2.0.

Release Process

Releases are automated through GitHub Actions:

  1. Update the version in gc_ruboconfig.gemspec
  2. Update CHANGELOG.md with the changes
  3. Create a tagged release on GitHub
  4. The gem will be automatically built and published to RubyGems

About

GoCardless Engineering shared rubocop config

Resources

Contributing

Security policy

Stars

3 stars

Watchers

61 watching

Forks

Releases

Packages

Used by

Contributors

Languages