Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphabetize RuboCop config, add todo file #91

Merged
merged 2 commits into from
May 12, 2024

Conversation

jgarber623
Copy link
Contributor

Description

The commits in this proposed change do two things:

  1. alphabetize the rules in .rubocop.yml (see commit message ae17887 for details), and
  2. generate a .rubocop_todo.yml file (commit 19ff793's message quoted below for clarity).

This commit streamlines the primary .rubocop.yml and, using bundle exec rubocop --auto-gen-config --auto-gen-only-exclude, generates a ".rubocop_todo.yml" file that can serve as a guide for future refactoring.

I've used this file with quite a bit of success on projects. A reasonable goal is that, over time, the file is removed once all issues have either been remediated or a sensible configuration change can be applied to the main .rubocop.yml config.

Documentation for .rubocop_todo.yml may be found here:

https://docs.rubocop.org/rubocop/configuration.html#automatically-generated-configuration

I'd like to take a swing at a few of the "todo" items in the newly-created file. Worth noting, too, that the Style/FrozenStringLiteral rule in .rubocop_todo.yml is (among other proposed changes) addressed in #89.

Testing

  1. Pull the latest and git switch rubocop-config-changes.
  2. bundle install if necessary.
  3. bundle exec rubocop and note linting passes!

As this file grows and without imposing some sort of organization to it,
managing `.rubocop.yml` gets really tedious. This change reorganizes the
existing file's rules alphabetically.
This commit streamlines the primary `.rubocop.yml` and, using `bundle
exec rubocop --auto-gen-config --auto-gen-only-exclude`, generates a
".rubocop_todo.yml" file that can serve as a guide for future
refactoring.

I've used this file with quite a bit of success on projects. A
reasonable goal is that, over time, the file is removed once all issues
have either been remediated or a sensible configuration change can be
applied to the main `.rubocop.yml` config.

Documentation:

https://docs.rubocop.org/rubocop/configuration.html#automatically-generated-configuration
@radar radar merged commit ffe7b9f into radar:master May 12, 2024
3 checks passed
@jgarber623 jgarber623 deleted the rubocop-config-changes branch May 12, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants