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.

Reply via email to