HoundCI Config LineLength

27 views
Skip to first unread message

Rick Salevsky

unread,
Jul 3, 2015, 10:22:39 AM7/3/15
to cro...@googlegroups.com
Hi all,

the default line length is set to 80 but this is mostly due historical
reasons. During the last days this topic rises up again and again so I
will bring the discussion to the mailing list.

I would rise up the allowed line length to 100 chars. We have very often
the case that a line has around 85 chars. That means we have to break
somewhere the line into 2 or 3 line parts. In the most cases this makes
the code harder to read and the code look awkward and disjointed. I
think 100 is the right size between to short and and to long that the
lines span too far across the monitor. That means that you can still
have two files side-by-side on your monitor.

Let's see how others thing about this maybe I forgot a important point.

Ciao,
--
Rick Salevsky, SUSE Cloud Engineer
rsal...@suse.com
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton
HRB 21284 (AG Nürnberg)
SUSE Linux GmbH
Maxfeldstraße 5
90409 Nürnberg
Germany

Thomas Boerger

unread,
Jul 3, 2015, 10:37:22 AM7/3/15
to Rick Salevsky, cro...@googlegroups.com
I'm still not a friend of increasing the line length. It's a convetion that works fine for MANY ruby projects, so why should that not work for us? Quite often the line length gets above 80 for some error messages, but these have to be placed in an translation file anyway to be prepared for i18n of the application. The other parts are often conditions which can be made shorter quite easy as well.
> --
> You received this message because you are subscribed to the Google Groups "crowbar" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to crowbar+u...@googlegroups.com.
> To post to this group, send email to cro...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/crowbar/1435933358.5398.76.camel%40suse.de.
> For more options, visit https://groups.google.com/d/optout.

Alberto Planas

unread,
Jul 3, 2015, 10:45:26 AM7/3/15
to cro...@googlegroups.com
On Friday, July 03, 2015 04:22:38 PM Rick Salevsky wrote:
> Hi all,
>
> the default line length is set to 80 but this is mostly due historical
> reasons. During the last days this topic rises up again and again so I
> will bring the discussion to the mailing list.

In other languages (Python) we set 79 for code and 72 for long comments.
This rule is really useful: I hate the vertical scroll in github, of when ssh
I see lines that break completely the indentation.

This rule is relaxed for non-public software, where you can extend this to
100.

IMHO this rules applies too to Ruby in some way, and because Crowbar is a
public project I will stick to this 79 (80) rule


--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu,
Graham Norton, HRB 21284 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

Adam Spiers

unread,
Jul 16, 2015, 12:49:39 PM7/16/15
to cro...@googlegroups.com
Rick Salevsky <rsal...@suse.de> wrote:
> Hi all,
>
> the default line length is set to 80 but this is mostly due historical
> reasons. During the last days this topic rises up again and again so I
> will bring the discussion to the mailing list.
>
> I would rise up the allowed line length to 100 chars. We have very often
> the case that a line has around 85 chars. That means we have to break
> somewhere the line into 2 or 3 line parts. In the most cases this makes
> the code harder to read and the code look awkward and disjointed.

That is the exact opposite of my experience. Perhaps you could give
some examples?

Thomas Boerger

unread,
Jul 16, 2015, 1:06:46 PM7/16/15
to Adam Spiers, cro...@googlegroups.com
This discussion is obsolete, the new SUSE style guide increased the line length to 100 chars :)

> --
> You received this message because you are subscribed to the Google Groups "crowbar" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to crowbar+u...@googlegroups.com.
> To post to this group, send email to cro...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/crowbar/20150716164938.GB1165%40indian.linksys.moosehall.

Adam Spiers

unread,
Jul 16, 2015, 1:18:47 PM7/16/15
to Thomas Boerger, cro...@googlegroups.com
Thomas Boerger <tboe...@suse.de> wrote:
> > Am 16.07.2015 um 18:49 schrieb Adam Spiers <asp...@suse.com>:
> >
> > Rick Salevsky <rsal...@suse.de> wrote:
> >> Hi all,
> >>
> >> the default line length is set to 80 but this is mostly due historical
> >> reasons. During the last days this topic rises up again and again so I
> >> will bring the discussion to the mailing list.
> >>
> >> I would rise up the allowed line length to 100 chars. We have very often
> >> the case that a line has around 85 chars. That means we have to break
> >> somewhere the line into 2 or 3 line parts. In the most cases this makes
> >> the code harder to read and the code look awkward and disjointed.
> >
> > That is the exact opposite of my experience. Perhaps you could give
> > some examples?
>
> This discussion is obsolete, the new SUSE style guide increased the
> line length to 100 chars :)

Great. 72 columns is enough for the kernel but we are more clever
than those guys so we need longer lines :-/

I'll file a bug report on the style guide.

Thomas Boerger

unread,
Jul 16, 2015, 1:28:26 PM7/16/15
to Adam Spiers, Thomas Boerger, cro...@googlegroups.com
We have anyway line lebgths up to 150 chars. So even with that cop setting we are far away from fixing these offenses.

> --
> You received this message because you are subscribed to the Google Groups "crowbar" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to crowbar+u...@googlegroups.com.
> To post to this group, send email to cro...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/crowbar/20150716171846.GE1165%40indian.linksys.moosehall.
Reply all
Reply to author
Forward
0 new messages