-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Mark Style/ModuleFunction as unsafe autocorrect #6613
Conversation
26563f3
to
25cf531
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.
Thank you! 🚀
5794dd9
to
dabd3fb
Compare
I've resolved the merge conflicts and bumped the |
Could you also move the |
dabd3fb
to
7064991
Compare
@Drenmi done! |
7064991
to
7d28eff
Compare
@Drenmi I've rebased this forward in hopes of getting it into the next release. Would love to clear this from my open PRs, please let me know if there's anything I can do to nudge it along. Thanks! |
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.
I think that it can be merged when CHANGELOG conflict is resolved.
7d28eff
to
bc0b8b4
Compare
Thanks @koic, i've resolved the conflict and re-pushed. |
Thank you @dduugg! |
This marks the Style/ModuleFunction cop as both
Autocorrect: false
andSafeAutocorrect: false
in the default configuration. This is consistent with the documentation ("These offenses are not auto-corrected since there are different implications to each approach."), although I have slightly reworded it here.The autocorrect was intentionally omitted when the cop was made configurable (see https://github.com/rubocop-hq/rubocop/pull/3173/files#diff-58bfe8eeff6579e001f02da76228d98fR26) because the styles are not equivalent. See the discussion at rubocop/ruby-style-guide#556 for more details.
I have not added tests b/c this is a configuration change, but happy to do so if you have any suggestions.
Thanks for your consideration.
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.