RuboCop config for Healthcare.
This is explicitly for Rails projects at the moment.
RuboCop provides valuable feedback to Ruby developers, which can both improve code quality and developers' breadth of knowledge of the language. It also provides various formatting rules and is therefore a common source of holy wars and yak shaving.
We use rubyfmt for auto-formatting, but want to make sure that RuboCop does not complain about rubyfmt-formatted code. Enter: this configuration.
Any additional rules added on top of this configuration should be well-thought-out and agreed-upon. We don't want RuboCop needlessly getting in our way, but we do want some of the advantages it can bring.
There are two rubocop configurations here: the base, rubocop.yml
, is suited for vanilla Ruby applications or gems; rails.yml
builds upon rubocop.yml
and offers additional Rails-specific rules, which should be used for Rails applications.
Want change? Make an issue first and discuss. We will push back on rule changes unless you make a compelling case.
- Add to Gemfile in the development group:
gem "rubocop", require: false
# gem "rubocop-rails", require: false # if you're using Rails
gem "rubocop-rspec", require: false
- Create a
.rubocop.yml
and populate it with your inherit. For a non-Rails app or gem, use:
inherit_from:
https://raw.github.com/nedap/rubocop-config/main/rubocop.yml
For a Rails app, use:
inherit_from:
https://raw.github.com/nedap/rubocop-config/main/rails.yml
No need to authenticate when using inherit_from
. There's nothing here that needs hiding.
rm .rubocop-https*