Here is a related issue, I notice that there are different conventions for spacing followed when using method calls with parenthesis, including `method(a,b)`, `method( a, b )` and `method( a,b )`. Does the list have a preference for one of the styles when I add parenthesis (to those methods that are not DSL like)?
I think our choices are `mymethod(a,b)` -- currently supported by rubocop `mymethod( a, b )` -- another common style or any other... On Sun, Aug 10, 2014 at 5:01 PM, Kylo Ginsberg <[email protected]> wrote: > On Sat, Aug 9, 2014 at 9:45 AM, Henrik Lindberg > <[email protected]> wrote: >> >> On 2014-09-08 24:13, Andy Parker wrote: >>> >>> On Fri, Aug 8, 2014 at 3:11 PM, Rahul Gopinath <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> While correcting AndOr, I come across methods calls such as `if >>> value.is_a? FixNum or value.is_a? Integer` >>> >>> How should we parenthesize it? is it `(value.is_a? FixNum) || >>> (value.is_a? Integer)` or should it be `value.is_a?(FixNum) || >>> value.is_a?(Integer)` ? >>> >>> >>> value.is_a?(FixNum) >>> >>> Parens around the method arguments are the clearest fix and we should >>> put them in everywhere IMO :) >>> >> >> +1, except in internal DSL like logic where it reduces readability > > > I definitely agree on the parentheses example above. > > Wrt requiring parens around method arguments *everywhere*, I have to admit > I've wanted that at times when reading puppet code, but I also suspect it > would be very high touch and perhaps controversial. > > And it sounds like we don't have consensus on that one. Henrik, can you give > an example or two where it would reduce readability? That might help guide > the discussion a bit. > >> >>> >> So I think we should turn on the `Style/Not` cop >>> > >>> >>> > Either way, I'm a +1 for adding in this rule too. >>> > >>> > No space after ! is my preferred style. And I'll just stop any >>> style wars >>> > and say it is the preferred style of the codebase (I am >>> channelling the >>> > puppet code gods). >>> > >> >> >> +1 > > > Sounds like we have agreement on Style/Not and Style/SpaceAfterNot. Shout > now if you disagree! > > Kylo > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-dev/CALsUZFF2nFyOpvTB5Ap1mEvZ_NaC2y-VN00Pic_ZdKt%2B0_rh0g%40mail.gmail.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CA%2BemFfxPdki%2BAFHHpSdCC%3D5z6DScOswsOZpw6aq%3Dqdsz%3Dh%3Dt8Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
