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
Add new Gemspec/RequireMFA
cop
#10243
Conversation
6ff0407
to
d515e9c
Compare
d2bbbf4
to
d78659c
Compare
Looks good to me. I'm just wondering about the name |
Happy to change it if you have any ideas! |
The I've heard talks by RubyGems developer about enabling MFA at past conferences. I think it's good to be able to detect this :-) |
That would be fine by me as it solves the problem with the name. :D |
d78659c
to
f0296e8
Compare
@bbatsov @koic I absolutely agree, my rationale for creating this was that we can encourage every gem that uses RuboCop to require MFA for pushes, which is best for the community. I've updated the PR to not have the |
Thank you for the update! This looks good to me. Can you squash your commits into one? As noted in Martin Fowler's "Refactoring 2nd edition", refactoring is closely tied to addition of new feature. Therefore once commits are separated, the context in which the refactoring took place is unknown. |
f0296e8
to
4b3c07f
Compare
Sure, I squashed the autocorrection commit in. I think the refactoring commit makes sense on its own because it's affecting multiple cops. I'm partial to @marcandre's blog about it 😁 |
As a most active contributor for several years, I like the pragmatic policies of Martin Fowler (No one can talk about refactoring better than he). Anyway that's it for this topic, as it's not the main subject of this PR and I'm grateful for your contribution :-) |
4b3c07f
to
f7b8db6
Compare
Because `.rubocop.yml` is set to `NewCops: enable`, these newly added cops detect offenses when Rake Task is running. * rubocop/rubocop#10243 * rubocop/rubocop#10502
Following #10239, adds a new
Gemspec
cop to ensure that therubygems_mfa_required
metadata is set.By default operates in
Strict
mode which requiresrubygems_mfa_required
to be set totrue
. If givenStrict: false
, it just checks that it is given a value.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.