Super-linter: Ruby: Switch from RuboCop to StandardRB

Created on 19 Jun 2020  路  10Comments  路  Source: github/super-linter

The beauty of Ruby Standard Style is that it's simple. No one wants to maintain multiple hundred-line style configuration files for every module/project they work on. RuboCops defaults are not that complete.

Under the hood standard uses RuboCop but with saner community defaults that are not customized by GitHub only.
In my opinion using standard better match the philosophy of this project.

https://github.com/testdouble/standard

Ready enhancement help wanted

Most helpful comment

It looks like this is currently using rubocop-github, which has some good rules, but I wouldn't recommend for use outside GitHub. I think either the default rules or standard are good choices.

I'm not too familiar with how this action works, but we might be able to get the best of both worlds by:

  • If a .rubocop.yml exists in the project, use that
  • Otherwise run standard with its rules

All 10 comments

Thanks for opening this issue @gobijan! I'm checking with other GitHub folks but I would like to hear more opinions from others to try to understand if there is consensus around this.

It looks like this is currently using rubocop-github, which has some good rules, but I wouldn't recommend for use outside GitHub. I think either the default rules or standard are good choices.

I'm not too familiar with how this action works, but we might be able to get the best of both worlds by:

  • If a .rubocop.yml exists in the project, use that
  • Otherwise run standard with its rules

Thanks @jhawthorn! That sounds reasonable to me. Any objections @gobijan?

I really like the proposal :) Thx for the openness.
Do you need any support in implementation?

@gobijan Yes please. Feel free to open a PR. I will mark this as ready.

I'm late to the party, but I feel I must point out that you might be overestimating StandardRB's fan base a little. Just because something names itself as "the standard" doesn't mean that it is. Most existing Ruby projects would _not_ pass StandardRB's rather opinionated ruleset.

Switching from the current ruleset to StandardRB would be a breaking change for current users of the Super-Linter.

I think we can make this an add the StandardRB as an additional check

smart idea @admiralAwkbar!

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 馃 label or comment on the issue.

Now that standard.rb is officiall in version 1, this should be reconsidered.
https://blog.testdouble.com/posts/2021-03-04-announcing-standard-ruby-1.0/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrick-compass picture patrick-compass  路  4Comments

jimsmith picture jimsmith  路  5Comments

ymd-h picture ymd-h  路  3Comments

jasonkarns picture jasonkarns  路  5Comments

MuhaddiMu picture MuhaddiMu  路  3Comments