Skip to content

Add support for standardrb #351

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
cquinones100 opened this issue Mar 31, 2023 · 8 comments
Closed

Add support for standardrb #351

cquinones100 opened this issue Mar 31, 2023 · 8 comments

Comments

@cquinones100
Copy link

We use standard along with rubocop in our project. We use the inherit_gem config in .rubocop.yml to add on to standard's config. We also use the require config to require standard along with other gems we use (rubocop-performance, rubocop-rails, etc).

Can a channel be made that requires standard?

@BrianHawley
Copy link

It should be possible to just include the standard gem in all regular channels that have compatible rubocop versions, then let people's rubocop config decide whether or not to use it.

@RubyBrewsday
Copy link

So actually @cquinones100 we do have a dedicated standardrb plugin already, we just don't actually have documentation up for it so I 100% understand how you haven't been able to add that in. Right now we only support version 1.1.5 but are in the process of releasing a newer version 1.4.0 in the near future.

To enable standard for your codebase, simply add the following to the plugins section of your .codeclimate.yml file:

plugins: 
  standard:
    enabled: true
---the rest of your configuration---

I'm really curious how this will work out for you. Please give it a shot and let us know if that solves your issue, otherwise happy to look into that some more 😄

Also so sorry for not responding sooner, will try and keep an eye out more in the future.

@cquinones100
Copy link
Author

Hi @RubyBrewsday thanks for the response! We don't use standard directly, instead we use it via rubocop[https://github.com/testdouble/standard#usage-via-rubocop], so I don't think we need the standard plugin-- instead i think we need a rubocop plugin channel that includes standard as @BrianHawley mentioned.

Additional context: we use rubocop version 1.39.0

@RubyBrewsday
Copy link

Ah gotcha, thanks for the extra context @cquinones100, makes sense to me. Yeah I think we should be able to make that happen for you.

@RubyBrewsday
Copy link

@cquinones100 Hey there, I hope you had a good weekend. Just wanted to give a heads up that I've tested out a fix and we should be pushing that up later on today. I'll let you know when that is ready to go but you should be able to use standard if you set your rubocop channel to rubocop-1-39-0 in your .codeclimate.yml file.

@RubyBrewsday
Copy link

@cquinones100 Okie doke, those changes should have gone out yesterday afternoon. If you could try re-running analysis on your repo and let us know how that works out for you that would be awesome. In case you might not know how to manually refresh your repo, check out this support article and that should show you the easiest way too (besides pushing up new code 😄): https://docs.codeclimate.com/docs/branches-and-comparisons#section-what-triggers-a-branch-analysis

@BrianHawley
Copy link

@RubyBrewsday you should also make a PR for channel/beta.

BrianHawley added a commit to BrianHawley/codeclimate-rubocop that referenced this issue Apr 24, 2023
- General bundle update.
- Update the docs too.
- Add standard gem. Note this limits the rubocop-performance version.
  Fixes codeclimate#351.
BrianHawley added a commit to BrianHawley/codeclimate-rubocop that referenced this issue May 2, 2023
- General bundle update.
- Update the docs too.
- Add standard gem. Note this limits the rubocop-performance version.
  Fixes codeclimate#351.
BrianHawley added a commit to BrianHawley/codeclimate-rubocop that referenced this issue May 9, 2023
- General bundle update.
- Update the docs too.
- Add standard gem. Note this limits the rubocop-performance version.
  Fixes codeclimate#351.
SOyeniyi801 pushed a commit that referenced this issue May 11, 2023
- General bundle update.
- Update the docs too.
- Add standard gem. Note this limits the rubocop-performance version.
  Fixes #351.
@BrianHawley
Copy link

BrianHawley commented May 23, 2023

It turns out that the standard gems are not released at the same pace as the corresponding rubocop gems that they reference. This means that referencing the standard gems at all in this engine prevents us from updating the other rubocop gems when new versions come out. This is currently preventing us from updating rubocop to 1.51.0, for instance.

It might be a good idea to have a separate set of channels for rubocop with the standard gems included, so the regular rubocop channels can keep up to date.

Alternatively, it might be a good idea to have the standard engine be able to handle the case of people running standard through rubocop instead of through its own tools, so the regular rubocop engine doesn't have to reference the standard gems.

@cquinones100 @RubyBrewsday

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

No branches or pull requests

3 participants