Skip to content

Commit

Permalink
Use the same config on Code Climate as locally
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mkllnk committed Mar 31, 2021
1 parent f8ba256 commit 8f79fe2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins:
enabled: true
channel: "rubocop-1-12"
config:
file: ".rubocop_styleguide.yml"
file: ".rubocop.yml"
scss-lint:
enabled: true
checks:
Expand Down
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
5 changes: 1 addition & 4 deletions .rubocop_styleguide.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8f79fe2

Please sign in to comment.