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
Ship default .rubocop.yml #3731
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 rubygems#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 rubygems#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 rubygems#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 rubygems#3731 and this, the number of offenses have been reduced to 2. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
With rubygems#3731 and rubygems#3740 merged, this covers up the remaining part of the issues. This was discovered when one tries to create a gem with a different framework. Could be reproduced with: `bundle gem foo --ext --test=test-unit` 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>