Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 915 Bytes

STYLEGUIDE.md

File metadata and controls

29 lines (23 loc) · 915 Bytes

Styleguide

This styleguide defines the conventions that have been agreed upon when writing Swift code at Boinx Software. When contributing to this repository, the styleguide must be followed.

Swift Code

In general, please refer to the Ray Wenderlich Swift Style Guide for a set of sane defaults. This document lists certain aspects of writing Swift code that either differ from the Ray Wenderlich Swift Style Guide or that are particularly important for our organization.

Method and Conditional Braces

In contrast to many resources, we prefer method braces and other braces (if/else/switch/while etc.) to always open on the line below the statement and also close on a new line.

Preferred:

if someCondition
{
    // bla
}
else
{
    // foo
}

func myMethod(withArgument argument: Int, anotherArgument: Bool)
{
    // content
}