Mailinglist Archive: yast-devel (108 mails)

< Previous Next >
Re: [yast-devel] Yast and Rubocop? 80 columns
On Tue, Nov 25, 2014 at 05:29:50PM +0100, Ladislav Slezak wrote:
Dne 25.11.2014 v 13:27 Josef Reidinger napsal(a):

Ok, that's probably too much... What about 120? Personally I think the 80
chars limit does not make much sense with wide screen LCDs anymore...

wide screen LCD do not help you in textmode with 80 chars width terminal.
it is not so easy to get code that is on so long line. In general need for
long line is code smell :)

OK, I limited the length to 100 and fixed few longer lines. Going down to
80 is not that easy, rubocop reports 320 errors...

Yes, for existing code which uses too many too long lines we may
need to relax a bit, but in general, let me quote

Wrap lines at 80 columns. This is not a hard rule, but if you
break it, it should be only because the code would be less
readable otherwise (e.g. you are embedding a long URL).

Rationale: While long lines are not a problem on wide-screen
displays, many people look at the code on terminals, e-mail
clients, etc. where the viewport isn’t that wide. People also use
multiple editor windows side-by-side (e.g. when writing code and
tests for it simultaneously) or viewing diffs.

Martin Vidner, Cloud & Systems Management Team

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
< Previous Next >
Follow Ups