0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Code style checking for Stamped Ruby repositories, based on RuboCop
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

RuboCop Stamped

RuboCop configuration for use on Stamped open source and internal Ruby projects.

Installation

Gemfile

group :development, :test do
  gem "rubocop-stamped", require: false
  gem "rubocop-rails", require: false # Optional
end

.rubocop.yml

inherit_gem:
  rubocop-stamped:
    - config/default.yml
    - config/rails.yml # Optional

Usage

Generate a RuboCop configuration:

rubocop --auto-gen-config

See:

Automatically correct offenses:

rubocop --auto-correct
rubocop --safe-auto-correct

See:

Style

We mostly rely on standard for default styles, but we're also taking inspiration from these styleguides:

All the choices below are specific to Stamped:

Layout

  • Limit lines to 120 characters (Shopify)
  • Use spaces around operators, after commas, colons and semicolons, around { and before } (Shopify)

Style

  • Usage of trailing comma in multi-line collection literals is encouraged. It makes diffs smaller and more meaningful. (Shopify)
# not encouraged
{
  foo: :bar,
  baz: :toto
}

# encouraged
{
  foo: :bar,
  baz: :toto,
}

What's included

Default

inherit_gem:
  rubocop-stamped:
    - config/default.yml

Includes cops for:

Rails

inherit_gem:
  rubocop-stamped:
    - config/rails.yml

Includes cops for:

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/stampedai/rubocop-stamped. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

MIT