From 8f79fe276874ef5a06a1deca30c62d7cf64443fd Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 31 Mar 2021 15:25:19 +1100 Subject: [PATCH] Use the same config on Code Climate as locally We configured Code Climate to be aware of all open issues instead of ignoring open issues via the rubocop todo lists. We were hoping that Code Climate could give us some nice stats like progress if it's aware of all our open issues. But the graphs don't tell us anything. So it's better to have one source of truth for our open style issues and that is our rubocop config in this repository. It contains two todo lists that document all violations we would like to fix in the future but it's okay to submit pull requests that don't fix those. Instead of accepting new style issues in Code Climate, every pull request with new violations has to add them to the rubocop config. I hope that this will make rubocop more useful and encourage developers to reduce code style debt. --- .codeclimate.yml | 2 +- .rubocop.yml | 4 ++-- .rubocop_styleguide.yml | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index bf8b48b52d..86283d1ccb 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -4,7 +4,7 @@ plugins: enabled: true channel: "rubocop-1-12" config: - file: ".rubocop_styleguide.yml" + file: ".rubocop.yml" scss-lint: enabled: true checks: diff --git a/.rubocop.yml b/.rubocop.yml index b2ddd900b3..f779f8efde 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,8 +10,8 @@ inherit_from: # The automatically generated todo list to ignore all current violations. - .rubocop_todo.yml - # Our Open Food Network style guide. It's used by Code Climate. If you want to see all violations, - # then use only that configuration (like Code Climate): + # Our Open Food Network style guide. If you want to see all violations, + # then use only that configuration: # # bundle exec rubocop -c .rubocop_styleguide.yml # diff --git a/.rubocop_styleguide.yml b/.rubocop_styleguide.yml index 57623f0e22..b956e49708 100644 --- a/.rubocop_styleguide.yml +++ b/.rubocop_styleguide.yml @@ -1,9 +1,6 @@ # Our Open Food Network style guide. # -# These are the rules we agreed upon and we work towards. Code Climate uses -# these rules to rate our code and detect new violations. But when you run -# rubocop locally, the default configuration file `.rubocop.yml` loads -# our "todo lists" to ignore all current violations. +# These are the rules we agreed upon and we work towards. AllCops: NewCops: disable SuggestExtensions: false