Ship default .rubocop.yml#3731
Conversation
|
Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality. We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below. If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack. For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide |
|
Thanks for the PR @utkarsh2102! What other cops are need to reduce it to 0? |
9775964 to
14c0c2c
Compare
|
Hi @bronzdoc,
The other things that can bring down the offenses are mostly add frozen string literal comment, using double-quotes in some places, freezing a constant, and some other small things. |
|
Hi @deivid-rodriguez, |
|
Yes, please! |
deivid-rodriguez
left a comment
There was a problem hiding this comment.
This is great, I always wanted to do this but never got to it!
|
@utkarsh2102 I think if we are adding a default its better if we add all the cops that will reduce the offenses to 0 in this PR. |
Currently, there is no `.rubocop.yml` shipped by default. So when a user runs `rubocop` after creating a new gem via `bundle gem foo`, it throws a bunch of offenses. With the default `.rubocop.yml` present, the number of those offenses significantly reduce by 25. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
14c0c2c to
ef2dae4
Compare
deivid-rodriguez
left a comment
There was a problem hiding this comment.
Looks good to me! I believe we can iterate later to remove all offenses. But if @bronzdoc wants to do that here and you're ok with doing it, go ahead! 👍
|
Thanks! |
|
Thanks @utkarsh2102!! |
These offenses appear when you create a gem with `bundle gem foo` and run `rubocop` over it. Initially, there were around 45 offenses detected, but with ruby#3731 and this, the number of offenses have been reduced to 2. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
These offenses appear when you create a gem with `bundle gem foo` and run `rubocop` over it. Initially, there were around 45 offenses detected, but with ruby#3731 and this, the number of offenses have been reduced to 2. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
These offenses appear when you create a gem with `bundle gem foo` and run `rubocop` over it. Initially, there were around 45 offenses detected, but with ruby#3731 and this, the number of offenses have been reduced to 2. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
These offenses appear when you create a gem with `bundle gem foo` and run `rubocop` over it. Initially, there were around 45 offenses detected, but with ruby#3731 and this, the number of offenses have been reduced to 2. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
Description:
Currently, there is no
.rubocop.ymlshipped by default.So when a user runs
rubocopafter creating a new gem viabundle gem foo, it throws a bunch of offenses.With the default
.rubocop.ymlpresent, the number of those offenses significantly reduce by 25.What was the end-user or developer problem that led to this PR?
A bunch of offenses thrown by rubocop since there's no default
.rubocop.ymlfile.What is your fix for the problem, implemented in this PR?
This PR adds a default
.rubocop.ymlfile.Tasks:
I will abide by the code of conduct.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>