OpenMined / .github

All our community health files
Apache License 2.0
7 stars 13 forks source link

Code standards: Swift #10

Open simcof opened 4 years ago

madhavajay commented 4 years ago

I would say at the bare minimum SwiftLint for linting and SwiftLint autocorrect as a minimum for formatting: https://github.com/realm/SwiftLint

However it seems Google has their own swift-format tool which could be better for formatting. https://nshipster.com/swift-format/

I would probably agree with 80 char width. I will play around with it and report back on how it compares and if it's worth using.

Of course there are a lot more ways to format things given the longer function signatures in swift, so it might be easier to refer to an existing style guide like the excellent Apple docs or Googles own style guide: https://google.github.io/swift/