[katello-devel] Updated Ruby style guide

David Davis daviddavis at redhat.com
Mon Oct 15 12:14:41 UTC 2012


I would tend to agree with you in this case. I'm more apt to accept a line with 100+ characters if splitting it would mean having to add concatenation. However, like this is a line from our project:

  before_filter :find_role, :except => [:index, :items, :new, :create, :verbs_and_scopes, :auto_complete_search, :create_ldap_group, :destroy_ldap_group]

There's no reason why this line couldn't be:

  before_filter :find_role, :except => [:index, :items, :new, :create, 
    :verbs_and_scopes, :auto_complete_search, :create_ldap_group,
    :destroy_ldap_group]

David

----- Original Message -----
> From: "Jason Rist" <jrist at redhat.com>
> To: katello-devel at redhat.com
> Sent: Monday, October 15, 2012 8:08:09 AM
> Subject: Re: [katello-devel] Updated Ruby style guide
> 
> On 10/15/2012 01:22 AM, Lukas Zapletal wrote:
> > On Fri, Oct 12, 2012 at 02:15:43PM -0400, David Davis wrote:
> >> I'm also thinking of reiterating the 80 characters or less per
> >> line rule in our style guide. It's currently in the Github guide
> >> and I think it's great rule given that it's in our Python guide
> >> as well and Github cuts off commits after about 80 characters
> >> (you have to scroll over).
> > 
> > Why you think it's great? I think it's evil, because nobody no
> > longer
> > uses fixed eighty columns anymore and it's quite limiting. I mean,
> > xterm
> > opens up with 80, but everyone can resize it if needed.
> > 
> > There are many theoretical reasons why to wrap at 80 (like if a
> > line is
> > that long you should consider refactoring it blah blah). Crap. Give
> > me
> > practical reasons.
> > 
> > IMHO longer lines are sometimes better to read. And I personally
> > very
> > often need a line between 80 and let's say 100 which is very
> > readable,
> > but when wrapped it's awful.
> > 
> > I vote for not giving explicit limit and let it be: use reasonable
> > line
> > lengths.
> > 
> 
> 
> I personally like the no limits rule as well.  I would rather be able
> to
> read the whole line than see it split with concatenation characters.
> 
> --
> Jason E. Rist
> Senior Software Engineer
> Systems Management and Cloud Enablement
> Red Hat, Inc.
> +1.919.754.4048
> Freenode: jrist
> github/identi.ca: knowncitizen
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
> 




More information about the katello-devel mailing list