| 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.
| // | |
| // ContentView.swift | |
| // AppleLogo | |
| // | |
| // Created by Oskar Groth on 2021-06-17. | |
| // | |
| import SwiftUI | |
| struct ContentView: View { |
| import SwiftUI | |
| struct ContentView: View { | |
| var body: some View { | |
| VStack(spacing: 0) { | |
| Color.green | |
| Color.green | |
| Color.green | |
| Color.yellow | |
| Color.orange |
| // Run any SwiftUI view as a Mac app. | |
| import Cocoa | |
| import SwiftUI | |
| NSApplication.shared.run { | |
| VStack { | |
| Text("Hello, World") | |
| .padding() | |
| .background(Capsule().fill(Color.blue)) |
| // | |
| // ContentView.swift | |
| // DeleteMe | |
| // | |
| // Created by Chris Eidhof on 02.02.21. | |
| // | |
| import SwiftUI | |
| /* |
| 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 |