Skip to content
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

chore: RuboCop lint Style/M* #925

Merged
merged 2 commits into from Mar 4, 2019
Merged

chore: RuboCop lint Style/M* #925

merged 2 commits into from Mar 4, 2019

Conversation

iMacTia
Copy link
Member

@iMacTia iMacTia commented Mar 4, 2019

Description

See #854 - RuboCop linting

Fixes:

  • Style/MutableConstant
  • Style/ModuleFunction

Additional Notes

Style/MutableConstant: I had to re-enable a disabled cop because of this RuboCop bug rubocop/rubocop#6808

Style/ModuleFunction: I had to make a protected function public (but it's no big deal for this particular case, IMHO) because of differences between extend self and module_function rubocop/ruby-style-guide#556

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the utility function public and declaring it a module_function makes that code easier to learn.

Reducing mutability where it doesn't help also reduces cognitive burden.

LGTM!

@olleolleolle olleolleolle merged commit 8ba22d5 into master Mar 4, 2019
@olleolleolle olleolleolle deleted the fix/rubocop-style-m branch March 4, 2019 13:23
@olleolleolle olleolleolle mentioned this pull request Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants