codeclimate / codeclimate-rubocop

Code Climate Engine for Rubocop
MIT License
60 stars 45 forks source link

Add channel for Rubocop 1.24.1 #308

Open dgholz opened 2 years ago

dgholz commented 2 years ago

Hi, we'd like to update the version of Rubocop we install to match the latest available version (1.24.1). I don't see a matching channel branch on this repo, nor a matching engine in https://github.com/codeclimate/codeclimate/blob/master/config/engines.yml#L197. Please add support for version 1.24.1 of Rubocop.

BrianHawley commented 2 years ago

You can base it on channel/beta after #309 is merged (update: it's merged).

You can use the "beta" channel to keep up to date with the latest rubocop.

dgholz commented 2 years ago

You can use the "beta" channel to keep up to date with the latest rubocop.

Thanks @BrianHawley but we want Code Climate to run the same version of Rubocop as we have in our project's Gemfile on the latest commit on the master branch, so that devs working locally can run the same version & see the same Rubocop reports as they see in Code Climate. If Code Climate updates to a newer version of Rubocop before we can bump it in our Gemfile, then they might see a difference & spend time raising internal tickets or investigating it themselves.

I'd much prefer it if we could bump the version in our Gemfile and our .codeclimate.yml to keep them in sync, in a single commit.

Since your change in #309 is merged, are there any blockers you know of to creating the channel?

BrianHawley commented 2 years ago

@dgholz I can't create channels, so that's one. There's also a rubocop-rails bug fix release that the PR didn't include, though that only affects fixing rather than checking, which would require another PR. Another is that 1.25.0 is out today, so I'm going to make a new PR to update beta (#310), which will also include that rubocop-rails update.

In general though, creating new channels currently requires updates to the codeclimate CLI tool, while updating the beta channel doesn't require CLI updates. It would be possible, with a lot of work, to refactor the codeclimate tools so they don't need updates to support new rubocop channels. However, noone (not even me) has allocated the time to do that work. I have been using the beta channel to keep up, until that changes.

dgholz commented 2 years ago

@BrianHawley thanks, could you get someone who can create channels to unblock your PR? I see that Rubocop have released 1.25.0 and I'd be quite excited to let our devs know that the version of Rubocop they install locally from the Gemfile will match the version run on Code Climate. If I'd switched to the beta channel, we'd have had a mismatch until I found out about 1.25.0 & bumped it myself.

alauper commented 2 years ago

@BrianHawley You can base it on channel/beta after https://github.com/codeclimate/codeclimate-rubocop/pull/309 is merged (update: it's merged).

Is there any documentation regarding the beta channel. I'm a little confused on how it works. If I set my rubocop to version to 1.26.0 and code climate updates the beta to 1.26.1, which rubocop version will code climate test our repo with?

https://docs.codeclimate.com/docs/rubocop#using-rubocops-newer-versions

Screen Shot 2022-03-24 at 8 01 24 AM

Clicking the available channels link takes you here, and lists 1.23.0 up top, which rubocop released almost 5 months ago.

Screen Shot 2022-03-24 at 8 04 04 AM