GitHub's Swift Style Guide
When I was cleaning up my GitHub repos and stars, I found GitHub’s style guide for Swift, and I find this 2nd most starred style guide quite amusing.
Despite the fact that Xcode defaults to using 4 spaces for indentation (and we can clearly see the impact by checking tabs-or-spaces), the style guide suggests using tabs instead. I’m totally fine with that, but I can easily tell there are some disagreements among the contributors:
1 | var myGreatProperty: Int { |
But there’s more. For now (2017 Auguest 23), there are three Swift repos under GitHub’s main account – one source, two forks. Well, then let’s focus on SoftU2F, the ONLY Swift repository GitHub actually owns. Isn’t it natural for me to expect this repo to follow GitHub’s own style guide? But ironically, even SoftU2F is NOT doing that!
In conclusion, seems that GitHub is not interested in styling their Swift code, and thus the GitHub community (or at least the 4k stargazers) has no actual intention to follow GitHub’s style guide, too.