Identifier | Enabled by default | Supports autocorrection |
---|---|---|
attributes |
Disabled | No |
Attributes should be on their own lines in functions and types, but on the same line as variables and imports.
func makeGetCall() { | |
// Set up the URL request | |
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1" | |
guard let url = URL(string: todoEndpoint) else { | |
print("Error: cannot create URL") | |
return | |
} | |
let urlRequest = URLRequest(url: url) | |
// set up the session |