Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

deactivate the if-modifier rule #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

adler99
Copy link

@adler99 adler99 commented Oct 1, 2019

For long lines it's easy to miss the condition at the very end of the line. It doesn't seem to be possible to define a max line length only for the if-modifier case. (see e.g. rubocop/rubocop#6149). So best action right now is to deactivate the rule and let the dev decide...

For long lines it's easy to miss the condition at the very end of the line. It doesn't seem to be possible to define a max line length only for the if-modifier case. (see e.g. rubocop/rubocop#6149). So best action right now is to deactivate the rule and let the dev decide...
@adler99 adler99 requested a review from ttaghavi October 1, 2019 15:19
@barcoo-hb
Copy link

Just random though without knowing the exact best practices in ruby:
Another alternative might be to extract the condition-logic in a short helper method on the class

rubocop/ruby-style-guide#476

:-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants