Skip to content

RuboCop dual config #2740

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

Closed
wants to merge 8 commits into from
Closed

RuboCop dual config #2740

wants to merge 8 commits into from

Conversation

JoeCohen
Copy link
Member

@JoeCohen JoeCohen commented Feb 22, 2025

  • Adds 2nd RuboCop config file, used only by CodeClimate, which loads plugins with require
  • Tells CodeClimate GitHub App to use that file to configure RuboCop
  • Changes local (default) RuboCop config file to load extensions with plugins
  • Fixes CodeClimate CI error which was caused by using plugins. Ex: https://codeclimate.com/github/MushroomObserver/mushroom-observer/builds/11148
  • Result:
    • We can use RuboCop >= 1.72 locally
    • CodeClimate CI works

- Adds 2nd RuboCop config file, used only by CodeClimate, which loads extensions with `require`
- Tells CodeClimate GitHub App to use that file to configure RuboCop
- Changes local (default) RuboCop config file to load extensions with `plugins`
- Result:
  - Fixes CodeClimate CI error which was caused by using `plugins`.
Ex: https://codeclimate.com/github/MushroomObserver/mushroom-observer/builds/11148
  - RuboCop >= 1.72 works locally
@coveralls
Copy link
Collaborator

coveralls commented Feb 22, 2025

Coverage Status

coverage: 93.504%. remained the same
when pulling 0df809f on jdc-rubocop-dual-config
into 1f146d3 on main.

@JoeCohen JoeCohen marked this pull request as ready for review February 22, 2025 22:18
@JoeCohen
Copy link
Member Author

@mo-nathan & @nimmolo
This is an alternative to freezing the RuboCop version.
I'd mostly like your opinion whether it's the better alternative.

@JoeCohen
Copy link
Member Author

JoeCohen commented Feb 23, 2025

Advantage:

  • We can use RuboCop >= 1.72, so we get bug fixes as well as newer cops.
    Disadvantage:
  • The local Rubocop version is different from the Codeclimate CI version. (Looks to me like CI will be stuck on 1.71 unless/until Codeclimate updates its Rubocop "channel".)

@JoeCohen JoeCohen marked this pull request as draft February 23, 2025 04:11
@JoeCohen JoeCohen marked this pull request as ready for review February 23, 2025 04:52
@JoeCohen
Copy link
Member Author

JoeCohen commented Mar 1, 2025

I added:

I also contact CodeClimate directly via their support form.

@JoeCohen
Copy link
Member Author

Closing. Replaced by #2828.

@JoeCohen JoeCohen closed this Mar 22, 2025
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.

3 participants