-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion about adding a rule for line-lengths #4
Comments
What's a standard max length? 80? 100? We could start enforcing it informally on spaceship. Unless @linkyndy is open to adding a rule to the gem. |
80 is usually the standard, I think. For me it's always a question of "is it easier to parse as a full line or as a constantly ...and I'm never sure which is the right answer. I don't really have an opinion here but will happily comply with whatever we decide. |
79 chars is a standard coming back from the old days when console was 80 char length. Nowdays we have big screens so it shouldn't be forced strictly :)
Not sure what rails is doing though, maybe it's worth following their standards if they are sensible. |
I'm in favour of short(er) lines. The ruby style guide feels the same. The reason I didn't add this rubocop rule was because it would cause a lot of manual labour to fix the generated offences. If we find a way not to mess up everybody's feng-shui, I'm definitely up for this! |
Yes, adding this rule will cause a lot of Travis builds to go boom. So maybe add it as a warning first, than give everybody a month (or a week, or 2 months or if anybody can give a better guestimate 😅 ) to fix it and after that time, enforce it as a rule. Does that sound as a good process? |
It could be. Which apps are using this gem atm? I can help with this change if we leave /frontend out of it 😄 |
Frontend is not there atm, so we're ok-ish. format_parser, zip_tricks have it, don't know about the rest. But it should be pretty straightforward to fix offences in these ones. |
@WeTransfer/backend: Do we want to release a new version that actualy breaks on too long lines? |
I wouldn't now...it's not something that Rubocop can automatically fix, so it might cause some hassle for other people to comply with. But I certainly would like to see this in place! |
Yes. It is some hassle to comply with. Spaceship did it step by step. So first get rid of all the lines > 200 characters, than 175, 150 etc. This is a pretty large time effort though with absolutely no user impact. However, it does have positive developer impact 😅 |
I wouldn't make it break right away. An approach for this could be to start reducing line length and only enforce it on wt_style once all the repos are compliant. Do we have a list of repos currently using wt_style? |
This issue is meant as a discussion but fairly often I see code in WeTransfer projects (specifically spaceship, because I mainly work in spaceship) with fairly long line lengths (Examples: [1], [2] and there are a lot of examples to be honest) and personally I am not a really big fan.
It makes code fairly hard to read and line-wrapping in and editor makes it even harder to read.
There are a couple of solutions:
I've added some people to take part in this discussion. If anybody knows other people within WeTransfer that feel strongly about the subject, please tag them in this issue.
The text was updated successfully, but these errors were encountered: