Lines length under 80 chars
Let's keep lines length in all our files under 80 characters. This should be enforced using a swiftlint rule.
@biboran/z please, pay attention to this issue
@driver733 why 80?
@driver733 it sounds reasonable for the project but how about unit tests? Some of the tests require a very lengthy input due to the nature of ethereum. I don't think we will gain any improvement in tests understanding if we will simply indent long inputs.
@biboran
why 80?
For the improvement of readability See this.
it sounds reasonable for the project but how about unit tests?
I strongly believe that this rule has to be enforced both in test and project files for the purpose of readability and consistency.
@driver733 your link is broken. Let's use 120 characters for tests and 100 for the main project.
@driver733 what do you suggest as a replacement for lengthy inputs in tests?
@rockfridrich Fixed. @biboran Split array values into several lines. 80 lines is an industry standard and I believe that we should stick to it.
@driver733 lets say we have 100 bytes as UInt8 values. Are they supposed to span 100 lines?
@biboran Notice that I did not say that we should dedicate a line for each of the array elements. For instance, if your array spans 100 characters in one line simply split it in two or three lines (so that each line has equal number of characters).
@driver733 ok, makes sense. However, 80 characters doesn't make any sense because the rule afaik was designed for IBM punch cards. Lets come up with a reasonable logic to establish the limit of characters.
@driver733 I guess we can stick with 80 characters length just for the readability reasons. Would you be willing to implement it as a swiftlint rule?
@biboran https://github.com/realm/SwiftLint/blob/master/Rules.md#line-length