Mailinglist Archive: yast-devel (108 mails)

< Previous Next >
Re: [yast-devel] Yast and Rubocop?
Dne 25.11.2014 v 10:51 Josef Reidinger napsal(a):
when I see this change
), I am not sure if it helps with readability.
I think better change is to change it to

if ret == :skip && confirm_skipping "Skipping registration on user request"
@registration_skipped = true

in general I am not sure if it is wrong to use return in loops. What is
rationale behind?

It actually complained because of the extra "if" block.

It's similar to the usual "if" guard clauses:

if something return if !something
do_something ---> do_something

The requested change is this:

while foo while foo
if something next if !something
do_something ---> do_something
break break
end end

It saves one indentation level.


Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >