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

False positives of Style/IfUnlessModifier #8041

Closed
AlexWayfer opened this issue May 26, 2020 · 4 comments
Closed

False positives of Style/IfUnlessModifier #8041

AlexWayfer opened this issue May 26, 2020 · 4 comments

Comments

@AlexWayfer
Copy link
Contributor

AlexWayfer commented May 26, 2020

Hello.

Looks similar to #7885.

I'm trying to update RuboCop to version 0.84.0 for Formalism: AlexWayfer/formalism#50

I'm using tabs in this project.

And there is a condition which does not fit in one line.


Expected behavior

No offenses.

Actual behavior

Offense from Style/IfUnlessModifier.

Steps to reproduce the problem

						unless params_method_defined
							define_method(params_method_name) { @params[name] }
						end

image

image

RuboCop version

0.84.0 (using Parser 2.7.1.3, rubocop-ast 0.0.3, running on ruby 2.7.1 x86_64-linux)
@AlexWayfer
Copy link
Contributor Author

@AlexWayfer AlexWayfer changed the title False positive of Style/IfUnlessModifier with tabs indentation False positives of Style/IfUnlessModifier May 26, 2020
@AlexWayfer
Copy link
Contributor Author

Sorry, it affects not only tabs indentation, so it global false positives for IfUnlessModifier cop. Example: filewatcher/filewatcher#122

@jonas054
Copy link
Collaborator

Isn't this related to the change of default value for Layout/LineLength:Max to 120 in 0.84.0?

@AlexWayfer
Copy link
Contributor Author

Isn't this related to the change of default value for Layout/LineLength:Max to 120 in 0.84.0?

Yes, it's related. Thank you, I didn't notice that, there were no warnings in console…

Sorry.

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

No branches or pull requests

2 participants